Skip to content

Commit

Permalink
Add temporary storybook examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Oct 10, 2024
1 parent b92c5de commit 3d4d6cc
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions packages/components/src/tooltip/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ const meta: Meta< typeof Tooltip > = {
controls: { expanded: true },
docs: { canvas: { sourceState: 'shown' } },
},
decorators: [
( Story ) => {
return (
<>
<p id="test-description">Button's description</p>
<Story />
</>
);
},
],
};
export default meta;

Expand Down Expand Up @@ -74,3 +84,19 @@ Nested.args = {
),
text: 'Outer tooltip text',
};

export const AlreadyWithDescription: StoryFn< typeof Tooltip > = Template.bind(
{}
);
AlreadyWithDescription.args = {
children: (
<button aria-describedby="test-description">Tooltip Anchor</button>
),
text: 'Tooltip Text',
};

export const SameLabel: StoryFn< typeof Tooltip > = Template.bind( {} );
SameLabel.args = {
children: <button aria-label="Button label">Tooltip Anchor</button>,
text: 'Button label',
};

0 comments on commit 3d4d6cc

Please sign in to comment.