diff --git a/.gitignore b/.gitignore index d2d2082b..d6a1c4fc 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ dist .DS_Store .fleet .idea +*.story.md diff --git a/components/docgen.config.cjs b/components/docgen.config.cjs new file mode 100644 index 00000000..1a34ce41 --- /dev/null +++ b/components/docgen.config.cjs @@ -0,0 +1,7 @@ +const path = require('path'); + +module.exports = { + componentsRoot: 'src', + outDir: 'src', + getDestFile: (file, config) => path.join(config.outDir, file).replace(/\.vue$/, '.story.md'), +}; diff --git a/components/histoire.config.ts b/components/histoire.config.ts index 6cd0b386..a6bb7aa4 100644 --- a/components/histoire.config.ts +++ b/components/histoire.config.ts @@ -4,4 +4,7 @@ import { defineConfig } from 'histoire'; export default defineConfig({ plugins: [HstVue()], setupFile: './histoire.setup.ts', + defaultStoryProps: { + autoPropsDisabled: true, + }, }); diff --git a/components/package.json b/components/package.json index 6f06dd75..2dde10ad 100644 --- a/components/package.json +++ b/components/package.json @@ -28,6 +28,7 @@ "story:dev": "histoire dev", "story:build": "histoire build", "story:preview": "histoire preview", + "docs": " vue-docgen '**/*[!story].vue' -c docgen.config.cjs", "typecheck": "vue-tsc --noEmit" }, "devDependencies": { @@ -43,6 +44,7 @@ "vite": "4.3.7", "vite-plugin-dts": "2.3.0", "vitest": "0.31.1", + "vue-docgen-cli": "4.67.0", "vue-tsc": "1.8.0" }, "dependencies": { diff --git a/components/src/base-icon/base-icon.story.md b/components/src/base-icon/base-icon.story.md deleted file mode 100644 index e1df7dc5..00000000 --- a/components/src/base-icon/base-icon.story.md +++ /dev/null @@ -1,15 +0,0 @@ -See [Material Symbols](https://fonts.google.com/icons) for all available icons. - -### Props - -| Prop | Description | -| -------- | ----------------------------------------- | -| `name` | Name of the Material Symbol to render | -| `size` | Standardized font-size and optical weight | -| `weight` | Number between 100 (thin) and 700 (bold) | - -### Style Overrides - -| Variable | Default | -| ------------------- | ------------------- | -| `--base-icon-color` | `var(--foreground)` | diff --git a/components/src/base-icon/base-icon.story.vue b/components/src/base-icon/base-icon.story.vue index 4ce91480..3748e005 100644 --- a/components/src/base-icon/base-icon.story.vue +++ b/components/src/base-icon/base-icon.story.vue @@ -10,7 +10,7 @@ const state = reactive({