Skip to content

Commit

Permalink
refactor: Tooltip 노출 조건을 mouseEnter -> onClick으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
bytrustu committed Apr 4, 2024
1 parent 7391974 commit 56fab40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/shared/components/Box/Box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ type BoxProps = PropsWithChildren<
StyleProps &
AsProps & {
onBlur?: (e: FocusEvent<HTMLDivElement>) => void;
onClick?: () => void;
onMouseEnter?: () => void;
onMouseLeave?: () => void;
tabIndex?: number;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const Tooltip = ({ message, direction = 'top', icon }: PropsWithChildren<
<Box
position="relative"
display="inline-block"
onMouseEnter={() => setOpened(true)}
onClick={() => setOpened(true)}
onMouseLeave={() => setOpened(false)}
>
{icon}
Expand Down

0 comments on commit 56fab40

Please sign in to comment.