Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(breadcrumb): demo matches usage guidelines #2157

Merged
merged 1 commit into from
Mar 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions src/pages/components/breadcrumb/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,31 @@ usage documentation, see the Storybooks for each framework below.

<ComponentDemo
components={[
{ id: 'breadcrumb', label: 'Breadcrumb' },
{
id: 'breadcrumb',
label: 'Breadcrumb',
id: 'currentPage',
label: 'Current page breadcrumb',
},
]}>
<ComponentVariant
id="currentPage"
links={{
React:
'http://react.carbondesignsystem.com/?path=/story/breadcrumb--default',
Angular:
'https://angular.carbondesignsystem.com/?path=/story/components-breadcrumb--basic',
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvbreadcrumb--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=breadcrumb',
}}>{`
<Breadcrumb noTrailingSlash>
<BreadcrumbItem href="/">Breadcrumb 1</BreadcrumbItem>
<BreadcrumbItem href="/">Breadcrumb 2</BreadcrumbItem>
<BreadcrumbItem isCurrentPage href="/">Breadcrumb 3</BreadcrumbItem>
</Breadcrumb>
`}</ComponentVariant>
<ComponentVariant
id="breadcrumb"
knobs={{
Breadcrumb: ['noTrailingSlash'],
}}
links={{
React:
'http://react.carbondesignsystem.com/?path=/story/breadcrumb--default',
Expand All @@ -74,7 +89,7 @@ usage documentation, see the Storybooks for each framework below.
<Breadcrumb>
<BreadcrumbItem href="/">Breadcrumb 1</BreadcrumbItem>
<BreadcrumbItem href="/">Breadcrumb 2</BreadcrumbItem>
<BreadcrumbItem isCurrentPage href="/">Breadcrumb 3</BreadcrumbItem>
<BreadcrumbItem href="/">Breadcrumb 3</BreadcrumbItem>
</Breadcrumb>
`}</ComponentVariant>
</ComponentDemo>
27 changes: 21 additions & 6 deletions src/pages/components/breadcrumb/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,31 @@ type used should be consistent across a product.

<ComponentDemo
components={[
{ id: 'breadcrumb', label: 'Breadcrumb' },
{
id: 'breadcrumb',
label: 'Breadcrumb',
id: 'currentPage',
label: 'Current page breadcrumb',
},
]}>
<ComponentVariant
id="currentPage"
links={{
React:
'http://react.carbondesignsystem.com/?path=/story/breadcrumb--default',
Angular:
'https://angular.carbondesignsystem.com/?path=/story/components-breadcrumb--basic',
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvbreadcrumb--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=breadcrumb',
}}>{`
<Breadcrumb noTrailingSlash>
<BreadcrumbItem href="/">Breadcrumb 1</BreadcrumbItem>
<BreadcrumbItem href="/">Breadcrumb 2</BreadcrumbItem>
<BreadcrumbItem isCurrentPage href="/">Breadcrumb 3</BreadcrumbItem>
</Breadcrumb>
`}</ComponentVariant>
<ComponentVariant
id="breadcrumb"
knobs={{
Breadcrumb: ['noTrailingSlash'],
}}
links={{
React:
'http://react.carbondesignsystem.com/?path=/story/breadcrumb--default',
Expand All @@ -85,7 +100,7 @@ type used should be consistent across a product.
<Breadcrumb>
<BreadcrumbItem href="/">Breadcrumb 1</BreadcrumbItem>
<BreadcrumbItem href="/">Breadcrumb 2</BreadcrumbItem>
<BreadcrumbItem isCurrentPage href="/">Breadcrumb 3</BreadcrumbItem>
<BreadcrumbItem href="/">Breadcrumb 3</BreadcrumbItem>
</Breadcrumb>
`}</ComponentVariant>
</ComponentDemo>
Expand Down