[2/n][Storybook] Move AuthHeader Stories (#21)
### TL;DR This pull request refactors the directory structure of the `AuthHeader` component, moving it to the `Pages/Auth` directory. The meta property's attributes were also refined. ### What changed? The `AuthHeader` component and its story were relocated from the `packages/frontend/src/stories/` directory to the `packages/frontend/src/stories/Pages/Auth/` directory. The title in the meta property has been updated to `Pages/Auth/Header`. The previously explicit assertion that meta satisfies `Meta<typeof Header>` has been removed, making the type assertion implicit. ### How to test? To test these changes, navigate to the new directory and any references associated with `AuthHeader` component, verify that the software builds successfully, and confirm that Storybook correctly displays the AuthHeader story. ### Why make this change? This change improves the organization of the codebase by categorizing components into functionally relevant directories. This allows for better management and scalability of the code. Additionally, the adjustments made to the component's metadata in Storybook makes the documentation easier to understand.
This commit is contained in:
commit
5f5b0a4d4f
@ -2,17 +2,17 @@ import type { Meta, StoryObj } from '@storybook/react';
|
|||||||
|
|
||||||
import { Header } from './AuthHeader';
|
import { Header } from './AuthHeader';
|
||||||
|
|
||||||
const meta = {
|
const meta: Meta<typeof Header> = {
|
||||||
title: 'Auth/Header',
|
title: 'Pages/Auth/Header',
|
||||||
component: Header,
|
component: Header,
|
||||||
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
parameters: {
|
parameters: {
|
||||||
layout: 'centered',
|
layout: 'centered',
|
||||||
},
|
},
|
||||||
} satisfies Meta<typeof Header>;
|
};
|
||||||
|
|
||||||
export default meta;
|
export default meta;
|
||||||
|
|
||||||
type Story = StoryObj<typeof meta>;
|
type Story = StoryObj<typeof meta>;
|
||||||
|
|
||||||
export const Default: Story = {};
|
export const Default: Story = {};
|
Loading…
Reference in New Issue
Block a user