-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate breadcrumbs and change url paths to doc (#289)
* migrate breadcrumbs and change url paths to doc * lint fix
- Loading branch information
Showing
69 changed files
with
163 additions
and
158 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 was deleted.
Oops, something went wrong.
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,80 @@ | ||
import { | ||
Controls, | ||
Markdown, | ||
Primary, | ||
Stories, | ||
Subheading, | ||
Title, | ||
} from '@storybook/addon-docs' | ||
import { Meta, StoryObj } from '@storybook/react' | ||
import { Theme } from '../../../.storybook/components' | ||
import { Breadcrumbs } from './Breadcrumbs' | ||
import { BreadcrumbLink } from './BreadcrumbLink' | ||
import { BreadcrumbsLoading } from './BreadcrumbsLoading' | ||
import { BreadcrumbText } from './BreadcrumbText' | ||
import { BreadcrumbLoading } from './BreadcrumbLoading' | ||
|
||
const meta = { | ||
component: Breadcrumbs, | ||
parameters: { | ||
docs: { | ||
page: () => ( | ||
<> | ||
<Title /> | ||
<Markdown> | ||
These components render breadcrumbs, which can be used as a | ||
secondary navigation that helps to see the users location. | ||
Typically, you use the `BreadcrumbLink` component for the parent | ||
links and the `BreadcrumbText` component for the current page. You | ||
can use the `BreadcrumbLoading` component or the | ||
`BreadcrumbsLoading` component to show a loading state. | ||
</Markdown> | ||
<Primary /> | ||
<Subheading>Props</Subheading> | ||
<Controls /> | ||
<Theme | ||
component="breadcrumbs" | ||
items={[ | ||
'breadcrumbs', | ||
'breadcrumbLink', | ||
'breadcrumbText', | ||
'breadcrumbLoading', | ||
]} | ||
/> | ||
<Stories /> | ||
</> | ||
), | ||
}, | ||
}, | ||
} satisfies Meta<typeof Breadcrumbs> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof Breadcrumbs> | ||
|
||
export const Default: Story = { | ||
render: (args) => ( | ||
<Breadcrumbs {...args}> | ||
<BreadcrumbLink href="#">Start</BreadcrumbLink> | ||
<BreadcrumbLink href="#">User</BreadcrumbLink> | ||
<BreadcrumbText>Settings</BreadcrumbText> | ||
</Breadcrumbs> | ||
), | ||
} | ||
|
||
export const LoadingDefault: Story = { | ||
render: () => ( | ||
<Breadcrumbs> | ||
<BreadcrumbsLoading numberOfItems={3} /> | ||
</Breadcrumbs> | ||
), | ||
} | ||
|
||
export const LoadingCustom: Story = { | ||
render: () => ( | ||
<Breadcrumbs> | ||
<BreadcrumbLoading loadingBarProps={{ className: '!w-10' }} /> | ||
<BreadcrumbLoading /> | ||
<BreadcrumbText>Settings</BreadcrumbText> | ||
</Breadcrumbs> | ||
), | ||
} |
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
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
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
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
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
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
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
Oops, something went wrong.