diff --git a/packages/ui/src/components/Button/Button.tsx b/packages/ui/src/components/Button/Button.tsx index 06c6cf7..01f76be 100644 --- a/packages/ui/src/components/Button/Button.tsx +++ b/packages/ui/src/components/Button/Button.tsx @@ -18,7 +18,13 @@ export type ButtonType = ( props: PropsWithChildren>, ) => JSX.Element -export const Button: ButtonType = ({ as, className, size, children }) => { +export const Button: ButtonType = ({ + as, + className, + size, + children, + ...restProps +}) => { const Component = as || 'button' return ( @@ -33,8 +39,9 @@ export const Button: ButtonType = ({ as, className, size, children }) => { BUTTON_SIZE[size], className, )} + {...restProps} > - + {children} diff --git a/packages/ui/src/components/Chip/Chip.stories.tsx b/packages/ui/src/components/Chip/Chip.stories.tsx index 0fcd17e..d57c3f1 100644 --- a/packages/ui/src/components/Chip/Chip.stories.tsx +++ b/packages/ui/src/components/Chip/Chip.stories.tsx @@ -14,10 +14,10 @@ type Story = StoryObj export const Default: Story = { render: () => ( - - - - + + + + ), } @@ -32,12 +32,12 @@ export const ClickableChips: Story = { 'GOOD_AMBIENCE', 'KIND_SERVICE', ] as const - ).map((type) => ( + ).map((chipType) => ( { - console.log(`${type} 클릭됨!`) + console.log(`${chipType} 클릭됨!`) }} /> ))} diff --git a/packages/ui/src/components/Chip/Chip.tsx b/packages/ui/src/components/Chip/Chip.tsx index 5081739..55bc627 100644 --- a/packages/ui/src/components/Chip/Chip.tsx +++ b/packages/ui/src/components/Chip/Chip.tsx @@ -30,7 +30,7 @@ type ChipTagKey = keyof typeof CHIP_TAGS export type ChipProps = PolymorphicComponentProps< C, { - type: ChipTagKey + chipType: ChipTagKey onToggle?: () => void } > @@ -50,7 +50,7 @@ export type ChipType = ( * * @param as 렌더링할 HTML 태그 또는 컴포넌트 * @param className 추가 CSS 클래스 - * @param type 표시할 Chip 타입 + * @param chipType 표시할 Chip 타입 * @param onToggle 클릭 시 실행할 콜백 함수 * @param restProps 나머지 Props * @@ -62,12 +62,12 @@ export type ChipType = ( export const Chip: ChipType = ({ as, className, - type, + chipType, onToggle, ...restProps }) => { const Component = as || 'button' - const { icon, label } = CHIP_TAGS[type] + const { icon, label } = CHIP_TAGS[chipType] const [isActive, setIsActive] = useState(false) const onClick = () => { diff --git a/packages/ui/src/components/Icon/IconMap.ts b/packages/ui/src/components/Icon/IconMap.ts index 798c4f6..86f61f0 100644 --- a/packages/ui/src/components/Icon/IconMap.ts +++ b/packages/ui/src/components/Icon/IconMap.ts @@ -93,7 +93,7 @@ export const iconMap = { note: Note, smile: Smile, cry: Cry, - kakkoLogo: KakaoLogo, + kakaoLogo: KakaoLogo, crosshairs: Crosshairs, } diff --git a/packages/ui/src/components/SearchBar/SearchBar.tsx b/packages/ui/src/components/SearchBar/SearchBar.tsx index 4b21f7a..0ec8bbe 100644 --- a/packages/ui/src/components/SearchBar/SearchBar.tsx +++ b/packages/ui/src/components/SearchBar/SearchBar.tsx @@ -7,7 +7,7 @@ export const SearchBar = ({ href }: { href: string }) => { return ( { 'ui:items-center', 'ui:gap-2', )} + aria-label={'검색 페이지로 이동'} > { + const id = useId() const textareaRef = useRef(null) useLayoutEffect(() => { @@ -54,6 +55,7 @@ export const Textarea = ({ return (