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

chore(tags): migrate Tag examples to storybook #987

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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion demo/index.html
Expand Up @@ -144,7 +144,7 @@ <h1 class="c-main__title">React Components</h1>
<a class="u-fg-inherit" href="storybook/?path=/story/components-tabs-readme--page">Tabs</a>
</div>
<div class="u-mb-sm">
<a class="u-fg-inherit" href="tags">Tags</a>
<a class="u-fg-inherit" href="storybook/?path=/docs/components-tags-readme--page">Tags</a>
</div>
<div class="u-mb-sm">
<a class="u-fg-inherit" href="theming">Theming</a>
Expand Down
2 changes: 1 addition & 1 deletion packages/tags/README.md
Expand Up @@ -14,7 +14,7 @@ npm install react react-dom prop-types styled-components @zendeskgarden/react-th

## Usage

```jsx static
```jsx
import { ThemeProvider } from '@zendeskgarden/react-theming';
import { Tag } from '@zendeskgarden/react-tags';

Expand Down
178 changes: 0 additions & 178 deletions packages/tags/examples/advanced.md

This file was deleted.

150 changes: 0 additions & 150 deletions packages/tags/examples/basic.md

This file was deleted.

1 change: 0 additions & 1 deletion packages/tags/package.json
Expand Up @@ -16,7 +16,6 @@
],
"scripts": {
"build": "../../utils/scripts/build.sh",
"build:demo": "../../utils/scripts/build-demo.sh",
"start": "../../utils/scripts/start.sh"
},
"sideEffects": false,
Expand Down
6 changes: 6 additions & 0 deletions packages/tags/stories/1-Readme.stories.mdx
@@ -0,0 +1,6 @@
import { Meta, Description } from '@storybook/addon-docs/blocks';
import README from '../README.md';

<Meta title="Components/Tags/README" />

<Description>{README}</Description>
19 changes: 19 additions & 0 deletions packages/tags/stories/2-Examples.stories.tsx
@@ -0,0 +1,19 @@
/**
* Copyright Zendesk, Inc.
*
* Use of this source code is governed under the Apache License, Version 2.0
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { Meta } from '@storybook/react';
import { Tag } from '@zendeskgarden/react-tags';

export default {
title: 'Components/Tags',
subcomponents: { Tag, 'Tag.Avatar': Tag.Avatar, 'Tag.Close': Tag.Close }
} as Meta;

export { Default } from './examples/Default';
export { Advanced } from './examples/Advanced';
export { CustomHue } from './examples/CustomHue';
export { FontWeight } from './examples/FontWeight';