Skip to content

Commit

Permalink
chore: 버전업
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene028 committed Jun 1, 2024
1 parent 015545d commit 006f343
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/wow-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wowds-ui",
"version": "0.0.6",
"version": "0.0.9",
"description": "",
"author": "gdsc-hongik",
"repository": {
Expand Down
17 changes: 11 additions & 6 deletions packages/wow-ui/src/components/Chip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,19 @@ import type {
* @param {ComponentPropsWithRef<T>["ref"]} ref 렌더링된 요소 또는 컴포넌트에 연결할 ref.
*/

export interface ChipProps extends ToggleButtonProps {
export interface _ChipProps extends ToggleButtonProps {
label: string;
onDelete?: () => void;
}

export type ChipProps<C extends ElementType> = PolymorphicComponentProps<
C,
_ChipProps
>;

type ChipComponent = <T extends ElementType = "button">(
props: PolymorphicComponentProps<T, ChipProps>
) => ReactNode | null;
props: ChipProps<T>
) => ReactNode;

const ChipLabel = ({
label,
Expand Down Expand Up @@ -66,7 +71,7 @@ const Chip: ChipComponent & { displayName?: string } = forwardRef(
defaultChecked = false,
disabled = false,
...rest
}: PolymorphicComponentProps<T, ChipProps>,
}: ChipProps<T>,
ref: PolymorphicRef<T>
) => {
const Component = as || "button";
Expand Down Expand Up @@ -98,8 +103,6 @@ const Chip: ChipComponent & { displayName?: string } = forwardRef(

return (
<Component
// aria-label={`chip button ${isChecked ? "activated" : "inactivated"}`}
data-selected={isChecked}
ref={ref}
className={chip({
clickable: disabled ? false : clickable,
Expand All @@ -108,6 +111,8 @@ const Chip: ChipComponent & { displayName?: string } = forwardRef(
onClick={handleClick}
// onKeyDown={handleKeyDown}
{...rest.customStyle}
aria-label={`chip button ${isChecked ? "activated" : "inactivated"}`}
data-selected={isChecked}
>
<ChipLabel disabled={disabled} isChecked={isChecked} label={label} />
</Component>
Expand Down

0 comments on commit 006f343

Please sign in to comment.