@1d1s/design-system 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,24 @@
1
+ import { default as React } from 'react';
2
+ export interface ImagePickerProps extends Omit<React.ComponentPropsWithoutRef<"input">, "size"> {
3
+ /** 원형 이미지 영역 지름(px) */
4
+ size?: number;
5
+ /** 초기 이미지 URL */
6
+ defaultImageUrl?: string;
7
+ /** 하단 변경 버튼 텍스트 */
8
+ changeLabel?: string;
9
+ }
1
10
  /**
2
11
  * ImagePicker
3
12
  * 이미지 업로드 및 미리보기를 위한 컴포넌트
4
13
  *
5
14
  * @param onChange 파일 선택 시 호출되는 콜백 함수(optional)
15
+ * @param size 원형 이미지 영역 지름(px), 기본값 300
16
+ * @param defaultImageUrl 초기 이미지 URL
17
+ * @param changeLabel 하단 변경 버튼 텍스트(기본값: Change)
6
18
  *
7
19
  * @example 기본 사용
8
20
  * ```tsx
9
21
  * <ImagePicker onChange={(e) => console.log(e.target.files)} />
10
22
  * ```
11
23
  */
12
- export declare function ImagePicker({ onChange, ...props }: React.ComponentPropsWithoutRef<"input">): React.ReactElement;
24
+ export declare function ImagePicker({ onChange, size, defaultImageUrl, changeLabel, ...props }: ImagePickerProps): React.ReactElement;
@@ -4,3 +4,4 @@ declare const meta: Meta<typeof ImagePicker>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof ImagePicker>;
6
6
  export declare const Default: Story;
7
+ export declare const WithImage: Story;