diff --git a/packages/components/filters/filters-list/src/filters-list.readme.mdx b/packages/components/filters/filters-list/src/filters-list.readme.mdx new file mode 100644 index 0000000000..346090b28e --- /dev/null +++ b/packages/components/filters/filters-list/src/filters-list.readme.mdx @@ -0,0 +1,6 @@ +import { Meta, Markdown } from '@storybook/blocks'; +import ReadMe from './../README.md?raw' + + + +{ReadMe} diff --git a/packages/components/filters/filters-list/src/filters-list.stories.tsx b/packages/components/filters/filters-list/src/filters-list.stories.tsx new file mode 100644 index 0000000000..7aa0a77695 --- /dev/null +++ b/packages/components/filters/filters-list/src/filters-list.stories.tsx @@ -0,0 +1,22 @@ +import type { Meta, StoryObj } from '@storybook/react'; +import FiltersList from './filters-list'; + +const meta: Meta = { + title: 'components/Filters/FiltersList', + component: FiltersList, + tags: ['local-dev'], + argTypes: { + label: { + control: 'text', + }, + }, +}; +export default meta; + +type Story = StoryObj; + +export const BasicExample: Story = { + args: { + label: 'A list of filters', + }, +}; diff --git a/storybook/README.md b/storybook/README.md index 708d4f60fb..60765de3ba 100644 --- a/storybook/README.md +++ b/storybook/README.md @@ -20,6 +20,30 @@ yarn start This will open storybook in your browser. You can now start adding new components or modifying existing ones. +### Using Storybook as a component playground for local development + +When building a new component, storybook can be used to provide a "component playground" that builds a story that is only displayed while running storybook locally. This can be very useful for quick iteration and debugging. + +In order to specify that a story should only be available locally, add a `'local-dev'` tag to the `tags` option in the story's `meta` configuration. + +For example + +```tsx +import type { Meta, StoryObj } from '@storybook/react'; + +const meta: Meta = { + ... + tags: ['local-dev'], + ... +}; + +... + +export default meta; +``` + +When the component is ready to be released, remove the `local-dev` tag for the story in order for it to show up in the production storybook documentation. + ## Creating a build To create a storybook production-build, run the following command: