Skip to content

Commit

Permalink
Merge pull request #103 from ensdomains/tooltip-version-2
Browse files Browse the repository at this point in the history
add onShowCallback to Dynamic popover
  • Loading branch information
storywithoutend authored Feb 15, 2023
2 parents e7a7ddd + 3edacc6 commit 1834985
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ export const DynamicPopover = ({
const handleMouseenter = () => {
setPosition()
toggle(true)
onShowCallback?.()
}

const handleMouseleave = () => {
Expand Down
1 change: 0 additions & 1 deletion components/src/components/molecules/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ const TooltipPopoverElement = styled.div<{
border-radius: ${theme.radii.large};
padding: ${theme.space['2.5']} ${theme.space['2.5']} ${theme.space['2.5']}
${theme.space['3.5']};
/* border-color: ${theme.colors.border}; */
background: ${theme.colors.background};
${injectedCss[$mobilePlacement]}
Expand Down
3 changes: 3 additions & 0 deletions docs/src/reference/mdx/molecules/Tooltip.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ import { Tooltip, TooltipProps } from '@ensdomains/thorin'
placement="top"
targetId="buttonIdTop"
width={250}
onShowCallback={() => {
alert('shown')
}}
>
<Button
id="buttonIdTop"
Expand Down

0 comments on commit 1834985

Please sign in to comment.