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

docs(web-components): adding code links for web components #2588

Merged
merged 4 commits into from
Oct 21, 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
10 changes: 10 additions & 0 deletions src/pages/components/UI-shell-header/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ the Storybooks for each framework below.

</ResourceCard>
</Column>
<Column colLg={4} colMd={4} noGutterSm>
<ResourceCard
subTitle="Web Components (Community)"
href="https://web-components.carbondesignsystem.com/?path=/story/components-ui-shell--header"
>

<MdxIcon name="webcomponents" />

</ResourceCard>
</Column>
</Row>

## Demo
Expand Down
10 changes: 10 additions & 0 deletions src/pages/components/UI-shell-left-panel/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ see the Storybooks for each framework below.

</ResourceCard>
</Column>
<Column colLg={4} colMd={4} noGutterSm>
<ResourceCard
subTitle="Web Components (Community)"
href="https://web-components.carbondesignsystem.com/?path=/story/components-ui-shell--side-nav"
>

<MdxIcon name="webcomponents" />

</ResourceCard>
</Column>
</Row>

## Demo
Expand Down
11 changes: 11 additions & 0 deletions src/pages/components/accordion/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ usage documentation, see the Storybooks for each framework below.

</ResourceCard>
</Column>
<Column colLg={4} colMd={4} noGutterSm>
<ResourceCard
subTitle="Web Components (Community)"
href="https://web-components.carbondesignsystem.com/?path=/story/components-accordion--default"
>

<MdxIcon name="webcomponents" />

</ResourceCard>
</Column>
</Row>

## Live demo
Expand All @@ -72,6 +82,7 @@ usage documentation, see the Storybooks for each framework below.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvaccordion--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=accordion',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-accordion--default',
}}>
{`
<Accordion>
Expand Down
1 change: 1 addition & 0 deletions src/pages/components/accordion/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ extra click; instead use a full scrolling page with normal headers.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvaccordion--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=accordion',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-accordion--default',
}}>
{`
<Accordion>
Expand Down
12 changes: 12 additions & 0 deletions src/pages/components/breadcrumb/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ usage documentation, see the Storybooks for each framework below.

</ResourceCard>
</Column>
<Column colLg={4} colMd={4} noGutterSm>
<ResourceCard
subTitle="Web Components (Community)"
href="https://web-components.carbondesignsystem.com/?path=/story/components-breadcrumb--default"
>

<MdxIcon name="webcomponents" />

</ResourceCard>
</Column>
</Row>

## Live demo
Expand All @@ -68,6 +78,7 @@ usage documentation, see the Storybooks for each framework below.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvbreadcrumb--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=breadcrumb',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-breadcrumb--default',
}}>{`
<Breadcrumb noTrailingSlash>
<BreadcrumbItem href="/">Breadcrumb 1</BreadcrumbItem>
Expand All @@ -85,6 +96,7 @@ usage documentation, see the Storybooks for each framework below.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvbreadcrumb--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=breadcrumb',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-breadcrumb--default',
}}>{`
<Breadcrumb>
<BreadcrumbItem href="/">Breadcrumb 1</BreadcrumbItem>
Expand Down
2 changes: 2 additions & 0 deletions src/pages/components/breadcrumb/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ type used should be consistent across a product.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvbreadcrumb--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=breadcrumb',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-breadcrumb--default',
}}>{`
<Breadcrumb noTrailingSlash>
<BreadcrumbItem href="/">Breadcrumb 1</BreadcrumbItem>
Expand All @@ -96,6 +97,7 @@ type used should be consistent across a product.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvbreadcrumb--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=breadcrumb',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-breadcrumb--default',
}}>{`
<Breadcrumb>
<BreadcrumbItem href="/">Breadcrumb 1</BreadcrumbItem>
Expand Down
13 changes: 13 additions & 0 deletions src/pages/components/button/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ documentation, see the Storybooks for each framework below.

</ResourceCard>
</Column>
<Column colLg={4} colMd={4} noGutterSm>
<ResourceCard
subTitle="Web Components (Community)"
href="https://web-components.carbondesignsystem.com/?path=/story/components-button--default"
>

<MdxIcon name="webcomponents" />

</ResourceCard>
</Column>
</Row>

## Live demo
Expand Down Expand Up @@ -81,6 +91,7 @@ documentation, see the Storybooks for each framework below.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvbutton--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=button',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-button--default',
}}>{`
<Button>Button</Button>
`}</ComponentVariant>
Expand All @@ -97,6 +108,7 @@ documentation, see the Storybooks for each framework below.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvbutton--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=button',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-button--default',
}}>{`
<Button renderIcon={Add16}>Button</Button>
`}</ComponentVariant>
Expand All @@ -113,6 +125,7 @@ documentation, see the Storybooks for each framework below.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvbutton--icon-only',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=button',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-button--icon',
}}>{`
<Button
hasIconOnly
Expand Down
3 changes: 3 additions & 0 deletions src/pages/components/button/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ import { Add16 } from '@carbon/icons-react';
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvbutton--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=button',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-button--default',
}}>{`
<Button>Button</Button>
`}</ComponentVariant>
Expand All @@ -127,6 +128,7 @@ import { Add16 } from '@carbon/icons-react';
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvbutton--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=button',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-button--default',
}}>{`
<Button renderIcon={Add16}>Button</Button>
`}</ComponentVariant>
Expand All @@ -143,6 +145,7 @@ import { Add16 } from '@carbon/icons-react';
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvbutton--icon-only',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=button',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-button--icon',
}}>{`
<Button
hasIconOnly
Expand Down
11 changes: 11 additions & 0 deletions src/pages/components/checkbox/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ documentation, see the Storybooks for each framework below.

</ResourceCard>
</Column>
<Column colLg={4} colMd={4} noGutterSm>
<ResourceCard
subTitle="Web Components (Community)"
href="https://web-components.carbondesignsystem.com/?path=/story/components-checkbox--default"
>

<MdxIcon name="webcomponents" />

</ResourceCard>
</Column>
</Row>

## Live demo
Expand All @@ -68,6 +78,7 @@ documentation, see the Storybooks for each framework below.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvcheckbox--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=checkbox',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-checkbox--default',
}}>{`
<fieldset className="bx--fieldset">
<legend className="bx--label">Checkbox heading</legend>
Expand Down
1 change: 1 addition & 0 deletions src/pages/components/checkbox/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ set whereas radio buttons allow the user to select only one option.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvcheckbox--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=checkbox',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-checkbox--default',
}}>{`
<fieldset className="bx--fieldset">
<legend className="bx--label">Checkbox heading</legend>
Expand Down
13 changes: 13 additions & 0 deletions src/pages/components/code-snippet/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ usage documentation, see the Storybooks for each framework below.

</ResourceCard>
</Column>
<Column colLg={4} colMd={4} noGutterSm>
<ResourceCard
subTitle="Web Components (Community)"
href="https://web-components.carbondesignsystem.com/?path=/story/components-code-snippet--single-line"
>

<MdxIcon name="webcomponents" />

</ResourceCard>
</Column>
</Row>

## Live demo
Expand Down Expand Up @@ -82,6 +92,7 @@ import {
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvcodesnippet--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=code-snippet',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-code-snippet--single-line',
}}>{`
<CodeSnippet type="single">
${codeSnippetSingle}
Expand All @@ -98,6 +109,7 @@ import {
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvcodesnippet--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=code-snippet',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-code-snippet--multi-line',
}}>{`
<CodeSnippet type="multi">
${codeSnippet}
Expand All @@ -114,6 +126,7 @@ import {
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvcodesnippet--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=code-snippet',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-code-snippet--inline',
}}>{`
<CodeSnippet type="inline">${codeSnippetSingle}</CodeSnippet>
`}</ComponentVariant>
Expand Down
3 changes: 3 additions & 0 deletions src/pages/components/code-snippet/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ length use cases—inline, single line, and multi-line.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvcodesnippet--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=code-snippet',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-code-snippet--single-line',
}}>{`
<CodeSnippet type="single">${codeSnippetSingle}</CodeSnippet>
`}</ComponentVariant>
Expand All @@ -101,6 +102,7 @@ length use cases—inline, single line, and multi-line.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvcodesnippet--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=code-snippet',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-code-snippet--multi-line',
}}>{`
<CodeSnippet type="multi">
{codeSnippet}
Expand All @@ -117,6 +119,7 @@ length use cases—inline, single line, and multi-line.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvcodesnippet--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=code-snippet',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-code-snippet--inline',
}}>{`
<CodeSnippet type="inline">${codeSnippetSingle}</CodeSnippet>
`}</ComponentVariant>
Expand Down
11 changes: 11 additions & 0 deletions src/pages/components/content-switcher/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ code usage documentation, see the Storybooks for each framework below.

</ResourceCard>
</Column>
<Column colLg={4} colMd={4} noGutterSm>
<ResourceCard
subTitle="Web Components (Community)"
href="https://web-components.carbondesignsystem.com/?path=/story/components-content-switcher--default"
>

<MdxIcon name="webcomponents" />

</ResourceCard>
</Column>
</Row>

## Live demo
Expand All @@ -73,6 +83,7 @@ code usage documentation, see the Storybooks for each framework below.
'http://vue.carbondesignsystem.com/?path=/story/components-cvcontentswitcher--default',
Vanilla:
'https://the-carbon-components.netlify.com/?nav=content-switcher',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-content-switcher--default',
}}>{`
<ContentSwitcher onChange={console.log}>
<Switch name={'first'} text='First section' />
Expand Down
1 change: 1 addition & 0 deletions src/pages/components/content-switcher/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ binary decision.
'http://vue.carbondesignsystem.com/?path=/story/components-cvcontentswitcher--default',
Vanilla:
'https://the-carbon-components.netlify.com/?nav=content-switcher',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-content-switcher--default',
}}>{`
<ContentSwitcher onChange={console.log}>
<Switch name={'first'} text='First section' />
Expand Down
14 changes: 14 additions & 0 deletions src/pages/components/data-table/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ usage documentation, see the Storybooks for each framework below.

</ResourceCard>
</Column>
<Column colLg={4} colMd={4} noGutterSm>
<ResourceCard
subTitle="Web Components (Community)"
href="https://web-components.carbondesignsystem.com/?path=/story/components-data-table--default"
>

<MdxIcon name="webcomponents" />

</ResourceCard>
</Column>
</Row>

## Live demo
Expand Down Expand Up @@ -88,6 +98,7 @@ usage documentation, see the Storybooks for each framework below.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvdatatable--minimal',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=data-table',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-data-table--default',
}}>
{`<DataTable rows={rowData} headers={headerData}>
{({ rows, headers, getHeaderProps, getTableProps }) => (
Expand Down Expand Up @@ -127,6 +138,7 @@ usage documentation, see the Storybooks for each framework below.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvdatatable--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=data-table',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-data-table--default',
}}>
{`<DataTable rows={rowData} headers={headerData}>
{({
Expand Down Expand Up @@ -175,6 +187,7 @@ usage documentation, see the Storybooks for each framework below.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvdatatable--slotted-expanding-data',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=data-table',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-data-table--expandable',
}}>
{`<DataTable
rows={rowData}
Expand Down Expand Up @@ -223,6 +236,7 @@ usage documentation, see the Storybooks for each framework below.
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvdatatable--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=data-table',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-data-table--default',
}}>
{`<DataTable rows={rowData} headers={headerData}>
{({
Expand Down
4 changes: 4 additions & 0 deletions src/pages/components/data-table/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ import {
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvdatatable--minimal',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=data-table',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-data-table--default',
}}>
{`<DataTable rows={rowData} headers={headerData}>
{({ rows, headers, getHeaderProps, getTableProps }) => (
Expand Down Expand Up @@ -135,6 +136,7 @@ import {
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvdatatable--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=data-table',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-data-table--default',
}}>
{`<DataTable rows={rowData} headers={headerData}>
{({
Expand Down Expand Up @@ -183,6 +185,7 @@ import {
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvdatatable--slotted-expanding-data',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=data-table',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-data-table--expandable',
}}>
{`<DataTable
rows={rowData}
Expand Down Expand Up @@ -231,6 +234,7 @@ import {
Vue:
'http://vue.carbondesignsystem.com/?path=/story/components-cvdatatable--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=data-table',
"Web Components": 'https://web-components.carbondesignsystem.com/?path=/story/components-data-table--default',
}}>
{`<DataTable rows={rowData} headers={headerData}>
{({
Expand Down
Loading