Skip to content

Commit

Permalink
chore(tags): migrate tag examples to storybook (#987)
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Green committed Jan 20, 2021
1 parent e673738 commit 864f04e
Show file tree
Hide file tree
Showing 13 changed files with 406 additions and 333 deletions.
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
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
6 changes: 5 additions & 1 deletion packages/avatars/stories/examples/ChromeUsage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ import { Chrome, Body, Header, HeaderItem, HeaderItemIcon } from '@zendeskgarden
import { Avatar } from '@zendeskgarden/react-avatars';
import GridIcon from '@zendeskgarden/svg-icons/src/16/grid-2x2-stroke.svg';

export const ChromeUsage: Story = () => {
/**
* https://github.com/storybookjs/storybook/issues/13362
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const ChromeUsage: Story = ({ foo }) => {
const CustomHeaderItem = HeaderItem as any;

return (
Expand Down
6 changes: 5 additions & 1 deletion packages/avatars/stories/examples/MenuUsage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ import { Avatar } from '@zendeskgarden/react-avatars';
import { Button } from '@zendeskgarden/react-buttons';
import { PALETTE } from '@zendeskgarden/react-theming';

export const MenuUsage: Story = () => {
/**
* https://github.com/storybookjs/storybook/issues/13362
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const MenuUsage: Story = ({ foo }) => {
const [highlightedItem, setHighlightedItem] = useState<number | null>();

return (
Expand Down
2 changes: 1 addition & 1 deletion packages/tags/README.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 864f04e

Please sign in to comment.