-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
docs: add popover stories
1 parent
ad993bf
commit de2994e
Showing
4 changed files
with
183 additions
and
3 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
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
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,52 @@ | ||
import type { Meta, StoryObj } from "storybook-solidjs"; | ||
|
||
import { Button, Popover, PopoverContent, PopoverTrigger } from "@codeui/kit"; | ||
import { DocsItemsContainer } from "./components/Section.jsx"; | ||
import { As } from "@kobalte/core"; | ||
|
||
// More on how to set up stories at: https://storybook.js.org/docs/7.0/solid/writing-stories/introduction | ||
const meta = { | ||
title: "DesignSystem/Popover", | ||
component: Popover, | ||
tags: ["autodocs"], | ||
argTypes: {}, | ||
} satisfies Meta<typeof Popover>; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const PopoverStory: Story = { | ||
name: "Popover", | ||
render: props => ( | ||
<Popover {...props}> | ||
<PopoverTrigger asChild> | ||
<As component={Button} theme={"secondary"}> | ||
Open | ||
</As> | ||
</PopoverTrigger> | ||
<PopoverContent title={"Title"}> | ||
About Kobalte A UI toolkit for building accessible web apps and design systems | ||
with SolidJS. | ||
</PopoverContent> | ||
</Popover> | ||
), | ||
}; | ||
|
||
export const CustomPosition: Story = { | ||
render: () => ( | ||
<DocsItemsContainer> | ||
<Popover placement={"bottom-start"}> | ||
<PopoverTrigger asChild> | ||
<As component={Button} theme={"secondary"}> | ||
Custom position | ||
</As> | ||
</PopoverTrigger> | ||
<PopoverContent title={"Title"}> | ||
About Kobalte A UI toolkit for building accessible web apps and design systems | ||
with SolidJS. | ||
</PopoverContent> | ||
</Popover> | ||
</DocsItemsContainer> | ||
), | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.