Skip to content

Commit

Permalink
fix: 타입추론 제대로 되도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene028 committed Jul 24, 2024
1 parent 1b3b761 commit 0db9c5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/wow-ui/src/components/Chip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ const Chip: ChipComponent & { displayName?: string } = forwardRef(
const handleClick = () => {
if (disabled) return;
onClick?.();
clickable ? setIsChecked((prev) => !prev) : null;
clickable ? setIsChecked((prev: boolean) => !prev) : null;
};

const handleKeyDown = (event: any) => {
if (!clickable || disabled) return;
if (event.currentTarget === event.target) {
event.preventDefault();
if (event.key === "Enter" || event.key === " ") {
setIsChecked((prev) => !prev);
setIsChecked((prev: boolean) => !prev);
onKeyDown?.();
}
}
Expand Down

0 comments on commit 0db9c5e

Please sign in to comment.