Skip to content

Commit

Permalink
story : story μˆ˜μ •
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloWook committed Dec 1, 2024
1 parent 0a685e3 commit ede3f96
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/components/Letter/SelectItem/SelectItem.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Meta, StoryObj } from '@storybook/react';
import { SelectItem } from './SelectItem';
import { MemoryRouter } from 'react-router-dom';
import React, { useState } from 'react';

const meta: Meta<typeof SelectItem> = {
component: SelectItem,
Expand All @@ -9,7 +10,7 @@ const meta: Meta<typeof SelectItem> = {
argTypes: {},
decorators: [
(Story) => (
<MemoryRouter>
<MemoryRouter initialEntries={['/']}>
<Story />
</MemoryRouter>
)
Expand All @@ -20,5 +21,9 @@ export default meta;
type Story = StoryObj<typeof SelectItem>;

export const Default: Story = {
args: {}
render: () => {
const [isActive, setIsActive] = useState(false);

return <SelectItem isActive={isActive} setIsActive={setIsActive} />;
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const meta: Meta<typeof SuccessModal> = {
argTypes: {},
decorators: [
(Story) => (
<MemoryRouter>
<MemoryRouter initialEntries={['/']}>
<Story />
</MemoryRouter>
)
Expand Down
1 change: 0 additions & 1 deletion src/pages/Letter/SelectItem/SelectItemPage.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { MemoryRouter } from 'react-router-dom';

import { SelectItemPage } from './SelectItemPage';

const meta: Meta<typeof SelectItemPage> = {
Expand Down

0 comments on commit ede3f96

Please sign in to comment.