-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db7d35c
commit 09a2fd6
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
) | ||
] | ||
}; |