chore(storybook): icons to correct folder (#216)

This pull request refactors several aspects of the frontend codebase focused on Storybook configurations and icon story files. It replaces `args` with `argTypes` to enhance control configurations, adds `staticDirs` for public assets in Storybook, and standardizes the titles of some icon stories.
This commit is contained in:
Vivian Phung 2024-06-22 17:27:37 -04:00 committed by GitHub
parent 54ae3f429d
commit af31fac3ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 33 additions and 15 deletions

View File

@ -9,6 +9,7 @@ import { join, dirname } from 'path';
function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, 'package.json')));
}
const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
@ -26,6 +27,7 @@ const config: StorybookConfig = {
docs: {
autodocs: 'tag',
},
staticDirs: ['../public'],
};
export default config;

View File

@ -6,9 +6,13 @@ const meta: Meta<typeof ChevronDownSmallIcon> = {
title: 'Icons/ChevronDownSmallIcon',
component: ChevronDownSmallIcon,
tags: ['autodocs'],
args: {
size: 'string | number' as unknown as any,
name: 'string',
argTypes: {
size: {
control: 'text',
},
name: {
control: 'text',
},
},
};

View File

@ -6,9 +6,13 @@ const meta: Meta<typeof ChevronRight> = {
title: 'Icons/ChevronRight',
component: ChevronRight,
tags: ['autodocs'],
args: {
size: 'string | number' as unknown as any,
name: 'string',
argTypes: {
size: {
control: 'text',
},
name: {
control: 'text',
},
},
};

View File

@ -6,9 +6,13 @@ const meta: Meta<typeof ChevronUpDown> = {
title: 'Icons/ChevronUpDown',
component: ChevronUpDown,
tags: ['autodocs'],
args: {
size: 'string | number' as unknown as any,
name: 'string',
argTypes: {
size: {
control: 'text',
},
name: {
control: 'text',
},
},
};

View File

@ -3,12 +3,16 @@ import { Meta, StoryObj } from '@storybook/react';
import { ChevronUpSmallIcon } from 'components/shared/CustomIcon';
const meta: Meta<typeof ChevronUpSmallIcon> = {
title: 'Components/ChevronUpSmallIcon',
title: 'Icons/ChevronUpSmallIcon',
component: ChevronUpSmallIcon,
tags: ['autodocs'],
args: {
size: 'string | number' as unknown as any,
name: 'string',
argTypes: {
size: {
control: 'text',
},
name: {
control: 'text',
},
},
};

View File

@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react';
import { CollaboratorsIcon } from 'components/shared/CustomIcon';
const meta: Meta<typeof CollaboratorsIcon> = {
title: 'Components/CollaboratorsIcon',
title: 'Icons/CollaboratorsIcon',
component: CollaboratorsIcon,
tags: ['autodocs'],
argTypes: {