Skip to content

Commit

Permalink
chore: add developing/testing component docs to Storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbert committed Jun 4, 2024
1 parent 469be75 commit 00327ee
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
7 changes: 6 additions & 1 deletion packages/storybook-react/config/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import '@utrecht/storybook-helpers/src/storybook-docs.scss';
import '@nl-design-system-unstable/amsterdam-design-tokens/dist/index.css';
import '@nl-design-system-unstable/rotterdam-design-tokens/dist/index.css';
import '@gemeente-denhaag/design-tokens-components/dist/theme/index.css';
console.log(results);

const preview: Preview = {
decorators: [
(Story: any) => <div className="utrecht-document">{Story()}</div>,
Expand Down Expand Up @@ -44,6 +44,11 @@ const preview: Preview = {
);
},
},
options: {
storySort: {
order: ['React Component', ['Component Introduction', 'Developing components', 'Testing components']],
},
},
...addonStatus,
...addonThemes,
...addonViewport,
Expand Down
6 changes: 3 additions & 3 deletions packages/storybook-react/src/stories/Introduction.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Description, Meta } from "@storybook/addon-docs";
import README from "@utrecht/component-library-react/README.md?raw";
import { Markdown, Meta } from "@storybook/blocks";
import document from "@utrecht/component-library-react/README.md?raw";

<Meta id="react--readme" title="React Component/Component Introduction" />

{/* @license CC0-1.0 */}

<Description markdown={README} />
<Markdown>{document}</Markdown>
8 changes: 8 additions & 0 deletions packages/storybook-react/src/stories/contributing.stories.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Markdown, Meta } from "@storybook/blocks";
import document from "@utrecht/component-library-react/CONTRIBUTING.md?raw";

<Meta id="react--contributing" title="React Component/Developing components" />

{/* @license CC0-1.0 */}

<Markdown>{document}</Markdown>
8 changes: 8 additions & 0 deletions packages/storybook-react/src/stories/testing.stories.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Markdown, Meta } from "@storybook/blocks";
import document from "@utrecht/component-library-react/TESTING.md?raw";

<Meta id="react--testing" title="React Component/Testing components" />

{/* @license CC0-1.0 */}

<Markdown>{document}</Markdown>

0 comments on commit 00327ee

Please sign in to comment.