[Storybook] Refactor Component Directories and Imports (#38)

This commit is contained in:
Vivian Phung 2024-05-14 15:22:43 -04:00 committed by GitHub
commit 7dcd6581a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 4 deletions

View File

@ -1,7 +1,7 @@
import { Meta, StoryObj } from '@storybook/react'; import { Meta, StoryObj } from '@storybook/react';
import { Avatar, AvatarVariants } from 'components/shared/Avatar'; import { Avatar, AvatarVariants } from 'components/shared/Avatar';
import { avatars, avatarsFallback } from '../pages/components/renders/avatar'; import { avatars, avatarsFallback } from 'pages/components/renders/avatar';
const avatarSizes: AvatarVariants['size'][] = [18, 20, 24, 28, 32, 36, 40, 44]; const avatarSizes: AvatarVariants['size'][] = [18, 20, 24, 28, 32, 36, 40, 44];
const avatarVariants: AvatarVariants['type'][] = ['gray', 'orange', 'blue']; const avatarVariants: AvatarVariants['type'][] = ['gray', 'orange', 'blue'];

View File

@ -7,7 +7,7 @@ import {
renderButtons, renderButtons,
renderDisabledButtons, renderDisabledButtons,
renderLinks, renderLinks,
} from '../pages/components/renders/button'; } from 'pages/components/renders/button';
const meta: Meta<typeof Button> = { const meta: Meta<typeof Button> = {
title: 'Components/Button', title: 'Components/Button',
@ -100,7 +100,9 @@ export const ButtonAll: Story = {
render: () => ( render: () => (
<div className="flex gap-5 flex-col items-center"> <div className="flex gap-5 flex-col items-center">
{/* Button */} {/* Button */}
<h1 className="text-2xl font-bold items-center justify-between">Button</h1> <h1 className="text-2xl font-bold items-center justify-between">
Button
</h1>
<div className="flex flex-col gap-10"> <div className="flex flex-col gap-10">
{renderButtons()} {renderButtons()}
{renderButtonIcons()} {renderButtonIcons()}

View File

@ -1,11 +1,12 @@
import { Meta, StoryObj } from '@storybook/react'; import { Meta, StoryObj } from '@storybook/react';
import Page from '../pages/components'; import Page from 'pages/components';
const meta: Meta<typeof Page> = { const meta: Meta<typeof Page> = {
component: Page, component: Page,
title: 'Components/All', title: 'Components/All',
}; };
export default meta; export default meta;
type Story = StoryObj<typeof Page>; type Story = StoryObj<typeof Page>;