File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { StorybookConfig } from '@nuxtjs/storybook'
22
33const config = {
4- stories : [ '../app/**/*.stories.@(js|ts|mdx )' ] ,
4+ stories : [ '../app/**/*.stories.@(js|ts)' ] ,
55 addons : [ '@storybook/addon-a11y' , '@storybook/addon-docs' ] ,
66 framework : '@storybook-vue/nuxt' ,
77 features : {
Original file line number Diff line number Diff line change @@ -3,17 +3,13 @@ import Component from './Base.vue'
33
44const meta = {
55 component : Component ,
6- tags : [ 'autodocs' ] ,
76} satisfies Meta < typeof Component >
87
98export default meta
109type Story = StoryObj < typeof meta >
1110
1211export const Primary : Story = {
13- args : {
14- variant : 'primary' ,
15- size : 'medium' ,
16- } ,
12+ args : { } ,
1713 render : args => ( {
1814 components : { Component } ,
1915 setup ( ) {
@@ -26,7 +22,6 @@ export const Primary: Story = {
2622export const Secondary : Story = {
2723 args : {
2824 variant : 'secondary' ,
29- size : 'medium' ,
3025 } ,
3126 render : args => ( {
3227 components : { Component } ,
@@ -53,8 +48,6 @@ export const Small: Story = {
5348
5449export const Disabled : Story = {
5550 args : {
56- variant : 'primary' ,
57- size : 'medium' ,
5851 disabled : true ,
5952 } ,
6053 render : args => ( {
@@ -69,7 +62,6 @@ export const Disabled: Story = {
6962export const WithIcon : Story = {
7063 args : {
7164 variant : 'secondary' ,
72- size : 'medium' ,
7365 classicon : 'i-carbon:search' ,
7466 } ,
7567 render : args => ( {
@@ -84,7 +76,6 @@ export const WithIcon: Story = {
8476export const WithKeyboardShortcut : Story = {
8577 args : {
8678 variant : 'secondary' ,
87- size : 'medium' ,
8879 ariaKeyshortcuts : '/' ,
8980 } ,
9081 render : args => ( {
@@ -98,8 +89,6 @@ export const WithKeyboardShortcut: Story = {
9889
9990export const Block : Story = {
10091 args : {
101- variant : 'primary' ,
102- size : 'medium' ,
10392 block : true ,
10493 } ,
10594 render : args => ( {
Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ const props = withDefaults(
8484 /**
8585 * HTML button type attribute
8686 * @default " button"
87- - `autodocs` usage is discouraged at this time, as it is buggy.
8887 type?: 'button' | 'submit'
8988 // ...
9089 }>)
@@ -108,3 +107,4 @@ Global application settings are added to the Storybook toolbar for easy testing
108107- Changing `i18n` in the toolbar doesn't update the language. A manual story reload is required.
109108- `autodocs` currently is non-functional due bugs, its usage is discouraged at this time.
110109- `storybook` currently fails to build and must be viewed in the dev environment.
110+ - Sibling nuxt modules will generate many warnings and errors on `pnpm storybook`. Unless something breaks, just ignore them.
Original file line number Diff line number Diff line change @@ -13,10 +13,9 @@ export default defineNuxtConfig({
1313 '@nuxt/fonts' ,
1414 'nuxt-og-image' ,
1515 '@nuxt/test-utils' ,
16- '@vite-pwa/nuxt' ,
1716 '@vueuse/nuxt' ,
1817 '@nuxtjs/i18n' ,
19- isStorybook ? undefined : '@ nuxtjs/color-mode',
18+ ... ( isStorybook ? [ ] : [ '@vite-pwa/nuxt' , '@ nuxtjs/color-mode'] ) ,
2019 ] ,
2120
2221 $test : {
You can’t perform that action at this time.
0 commit comments