Skip to content

Commit

Permalink
feat(ui-docs): Added Tooltip story
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksandarDev committed Oct 20, 2024
1 parent db7d35c commit 09a2fd6
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions web/apps/ui-docs/stories/Primitives/Tooltip.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { Info } from "@signalco/ui-icons";
import { Stack } from "@signalco/ui-primitives/Stack";
import { Tooltip, TooltipTrigger, TooltipContent } from "@signalco/ui-primitives/Tooltip";
import { Typography } from "@signalco/ui-primitives/Typography";
import { StoryObj } from "@storybook/react";

export default {
component: Tooltip,
tags: ['autodocs'],
args: {
delayDuration: 0,
children: (
<>
<TooltipTrigger>
<Info />
</TooltipTrigger>
<TooltipContent>
<Stack>
<Typography level="body1">Tooltip content</Typography>
<Typography level="body2">Example of tooltip with components as children</Typography>
</Stack>
</TooltipContent>
</>
)
}
};
type Story = StoryObj<typeof Tooltip>;

export const Default: Story = {
decorators: [
(Story) => (
<div className="p-8 flex flex-col items-center">
<Story />
</div>
)
]
};

0 comments on commit 09a2fd6

Please sign in to comment.