Skip to content

Commit

Permalink
use unsafeDisableTooltip prop for iconbuttons and remove explicit too…
Browse files Browse the repository at this point in the history
…ltips
  • Loading branch information
broccolinisoup committed Jul 8, 2024
1 parent c9415df commit ea8b026
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions packages/react/src/ButtonGroup/ButtonGroup.dev.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,13 @@ export const LinkAndButtonWithTooltip2 = () => (
Link
</Button>
</TooltipV2>
<TooltipV2 text="Open GitHub Copilot chat" direction="s">
<IconButton icon={CopilotIcon} aria-label="Open GitHub Copilot chat" />
</TooltipV2>
<IconButton icon={CopilotIcon} aria-label="Open GitHub Copilot chat" unsafeDisableTooltip={false} />
</ButtonGroup>
)

export const ButtonAndLinkWithTooltip2 = () => (
<ButtonGroup sx={{pl: 2}}>
<TooltipV2 text="Open GitHub Copilot chat" direction="s">
<IconButton icon={CopilotIcon} aria-label="Open GitHub Copilot chat" />
</TooltipV2>
<IconButton icon={CopilotIcon} aria-label="Open GitHub Copilot chat" unsafeDisableTooltip={false} />
<TooltipV2 text="Additional info about the link">
<Button as="a" href="https://primer.style">
Link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@ export const IconButtons = () => (

export const IconButtonsWithTooltip = () => (
<ButtonGroup>
<Tooltip text="Add" type="label">
<IconButton icon={PlusIcon} aria-label="Add" />
</Tooltip>
<Tooltip text="Subtract" type="label">
<IconButton icon={DashIcon} aria-label="Subtract" />
</Tooltip>
<IconButton icon={PlusIcon} aria-label="Add" unsafeDisableTooltip={false} />
<IconButton icon={DashIcon} aria-label="Subtract" unsafeDisableTooltip={false} />
</ButtonGroup>
)
export const ButtonAndLink = () => (
Expand Down

0 comments on commit ea8b026

Please sign in to comment.