Skip to content

Commit

Permalink
fix: fixed tooltip and definitiontooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
guidari committed Mar 5, 2024
1 parent 2e85235 commit 4ee5834
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/react/src/components/Tooltip/DefinitionTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ const DefinitionTooltip: React.FC<DefinitionTooltipProps> = ({
onMouseEnter={() => {
openOnHover ? setOpen(true) : null;
}}
onFocus={() => {
openOnHover ? setOpen(true) : null;
}}
open={isOpen}>
<button
{...rest}
Expand All @@ -113,9 +116,6 @@ const DefinitionTooltip: React.FC<DefinitionTooltipProps> = ({
onBlur={() => {
setOpen(false);
}}
onClick={() => {
setOpen(!isOpen);
}}
onKeyDown={onKeyDown}
type="button">
{children}
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Tooltip/Tooltip.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const Playground = PlaygroundStory.bind({});
Playground.args = {
align: 'bottom',
closeOnActivation: false,
defaultOpen: true,
defaultOpen: false,
label: 'Custom label',
};

Expand Down

0 comments on commit 4ee5834

Please sign in to comment.