Skip to content

Commit

Permalink
Tooltip id + anchor working (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
aidendk committed Jun 13, 2022
1 parent bec21cc commit ab36ff5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/nimble-components/src/tooltip/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const nimbleTooltip = Tooltip.compose({
baseName: 'tooltip',
baseClass: FoundationTooltip,
template,
styles,
styles
});

DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTooltip());
11 changes: 9 additions & 2 deletions packages/nimble-components/src/tooltip/tests/tooltip.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ const metadata: Meta<TooltipArgs> = {
render: createUserSelectedThemeStory(html<TooltipArgs>`
<nimble-button id="anchor">text</nimble-button>
<nimble-tooltip anchor='anchor'>tooltip text</nimble-tooltip>
<nimble-tooltip
anchor='anchor'
delay='${x => x.delay}'
?horiontalViewportLock="${x => x.horiontalViewportLock}"
?verticalViewportLock="${x => x.verticalViewportLock}"
>
${x => x.tooltip}
</nimble-tooltip>
`),
args: {
tooltip: 'Tooltip label',
Expand All @@ -45,4 +52,4 @@ const metadata: Meta<TooltipArgs> = {

export default metadata;

export const tooltip: StoryObj<TooltipArgs> = {}; // if checkbox changed to tooltip doesn't work
export const tooltip: StoryObj<TooltipArgs> = {};

0 comments on commit ab36ff5

Please sign in to comment.