Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions packages/styleguide/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ const config: StorybookConfig = {

typescript: {
reactDocgen: 'react-docgen-typescript',
reactDocgenTypescriptOptions: {
skipChildrenPropWithoutDoc: false,
shouldRemoveUndefinedFromOptional: true,
propFilter: (prop) => {
// Return false if fileName contains node_modules
if (prop.parent && /node_modules/.test(prop.parent.fileName)) {
return false;
}
// Return false if prop name is mode or theme
if (['mode', 'theme'].includes(prop.name)) {
return false;
}
return true;
},
},
},

webpackFinal(config) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@ const meta: Meta<typeof CTAButton> = {
href: {
description: 'If defined, component will use an anchor tag',
},
mode: {
control: {
type: 'select',
options: ['dark', 'light'],
},
},
size: {
control: {
type: 'select',
options: ['normal', 'small', 'large'],
},
},
as: {
table: {
disable: true,
},
},
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ const meta: Meta<typeof FillButton> = {
href: {
description: 'If defined, component will use an anchor tag',
},
mode: {
control: {
type: 'select',
options: ['dark', 'light'],
},
},
size: {
control: {
type: 'select',
Expand All @@ -30,6 +24,11 @@ const meta: Meta<typeof FillButton> = {
options: [SearchIcon],
},
},
as: {
table: {
disable: true,
},
},
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ const meta: Meta<typeof IconButton> = {
href: {
description: 'If defined, component will use an anchor tag',
},
mode: {
control: {
type: 'select',
options: ['dark', 'light'],
},
},
size: {
control: {
type: 'select',
Expand All @@ -35,6 +29,11 @@ const meta: Meta<typeof IconButton> = {
options: Object.keys(icons),
mapping: icons,
},
as: {
table: {
disable: true,
},
},
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ const meta: Meta<typeof StrokeButton> = {
href: {
description: 'If defined, component will use an anchor tag',
},
mode: {
control: {
type: 'select',
options: ['dark', 'light'],
},
},
size: {
control: {
type: 'select',
Expand All @@ -30,6 +24,11 @@ const meta: Meta<typeof StrokeButton> = {
options: [SearchIcon],
},
},
as: {
table: {
disable: true,
},
},
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ const meta: Meta<typeof TextButton> = {
href: {
description: 'If defined, component will use an anchor tag',
},
mode: {
control: {
type: 'select',
options: ['dark', 'light'],
},
},
size: {
control: {
type: 'select',
Expand All @@ -30,6 +24,11 @@ const meta: Meta<typeof TextButton> = {
options: [SearchIcon],
},
},
as: {
table: {
disable: true,
},
},
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const meta: Meta<typeof RadialProgress> = {
strokeWidth: 10,
value: 30,
size: 120,
children: '',
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type Story = StoryObj<typeof Box>;

export const Default: Story = {
args: {
as: 'div',
children: 'Hello work, I am a box!',
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ const meta: Meta<typeof SubmitButton> = {
type: 'boolean',
},
},
as: {
table: {
disable: true,
},
},
},
};

Expand Down
Loading