Skip to content

Commit 4470a8e

Browse files
committed
add auto docs
1 parent 45c83d9 commit 4470a8e

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { Meta, Title, Subtitle, Description, Primary, Controls } from '@storybook/blocks';
2+
3+
{/*
4+
* 👇 The isTemplate property is required to tell Storybook that this is a template
5+
* See https://storybook.js.org/docs/api/doc-blocks/doc-block-meta
6+
* to learn how to use
7+
*/}
8+
9+
<Meta isTemplate />
10+
11+
<Title />
12+
<Subtitle />
13+
<Description />
14+
15+
## Default implementation
16+
17+
<Primary />
18+
19+
## Available controls for story
20+
21+
<Controls />

libs/soba/.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { StorybookConfig } from '@storybook/angular';
22
import { resolve } from 'node:path';
33

44
const config: StorybookConfig = {
5-
stories: ['../**/*.stories.@(js|jsx|ts|tsx|mdx)'],
5+
stories: ['../**/*.mdx', '../**/*.stories.@(js|ts)'],
66
addons: ['@storybook/addon-essentials', 'storybook-addon-deep-controls'],
77
webpackFinal: async (config) => {
88
config.module?.rules?.push({

libs/soba/.storybook/preview.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import { Preview } from '@storybook/angular';
2+
// @ts-ignore
3+
import DocumentationTemplate from './documentation-template.mdx';
24

35
export default {
46
parameters: {
57
deepControls: { enabled: true },
8+
docs: {
9+
page: DocumentationTemplate,
10+
},
611
},
12+
tags: ['autodocs'],
713
} as Preview;

0 commit comments

Comments
 (0)