-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of github.com:boostcampwm-2024/web31-BooLock into …
…chore_1204
- Loading branch information
Showing
20 changed files
with
420 additions
and
103 deletions.
There are no files selected for viewing
28 changes: 0 additions & 28 deletions
28
apps/client/src/entities/home/GuideVideo/GuideVideo.stories.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
apps/client/src/entities/home/WorkspaceSampleButton/WorkspaceSampleButton.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { WorkspaceSampleButton } from './WorkspaceSampleButton'; | ||
|
||
const meta: Meta<typeof WorkspaceSampleButton> = { | ||
title: 'entities/home/WorkspaceSampleButton', | ||
component: WorkspaceSampleButton, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof WorkspaceSampleButton>; | ||
|
||
export const Default: Story = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
apps/client/src/entities/workspace/ImageTagModalButton/ImageTagModalButton.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { ImageTagModalButton } from './ImageTagModalButton'; | ||
|
||
const meta: Meta<typeof ImageTagModalButton> = { | ||
title: 'entities/workspace/ImageTagModalButton', | ||
component: ImageTagModalButton, | ||
parameters: { | ||
layout: 'centered', | ||
docs: { | ||
description: { | ||
component: 'img 태그 src 속성 적용을 위한 모달창에 사용되는 버튼 컴포넌트', | ||
}, | ||
}, | ||
}, | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof ImageTagModalButton>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
content: '이미지 선택하기', | ||
isBlue: true, | ||
onClick: () => {}, | ||
}, | ||
render: (args) => { | ||
return ( | ||
<ImageTagModalButton content={args.content} isBlue={args.isBlue} onClick={args.onClick} /> | ||
); | ||
}, | ||
}; | ||
|
||
export const Close: Story = { | ||
args: { | ||
content: '닫기', | ||
isBlue: false, | ||
onClick: () => {}, | ||
}, | ||
render: (args) => { | ||
return ( | ||
<ImageTagModalButton content={args.content} isBlue={args.isBlue} onClick={args.onClick} /> | ||
); | ||
}, | ||
}; |
34 changes: 34 additions & 0 deletions
34
apps/client/src/entities/workspace/ImageTagModalHeader/ImageTagModalHeader.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { ImageTagModalHeader } from './ImageTagModalHeader'; | ||
|
||
const meta: Meta<typeof ImageTagModalHeader> = { | ||
title: 'entities/workspace/ImageTagModalHeader', | ||
component: ImageTagModalHeader, | ||
parameters: { | ||
layout: 'centered', | ||
docs: { | ||
description: { | ||
component: 'img 태그 src 속성 적용을 위한 모달창에 사용되는 헤더', | ||
}, | ||
}, | ||
}, | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof ImageTagModalHeader>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
onClose: () => {}, | ||
}, | ||
render: (args) => { | ||
return ( | ||
<div className="w-80"> | ||
<ImageTagModalHeader onClose={args.onClose} /> | ||
</div> | ||
); | ||
}, | ||
}; |
34 changes: 34 additions & 0 deletions
34
apps/client/src/entities/workspace/ImageTagModalImg/ImageTagModalImg.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { ImageTagModalImg } from './ImageTagModalImg'; | ||
|
||
const meta: Meta<typeof ImageTagModalImg> = { | ||
title: 'entities/workspace/ImageTagModalImg', | ||
component: ImageTagModalImg, | ||
parameters: { | ||
layout: 'centered', | ||
docs: { | ||
description: { | ||
component: 'img 태그 src 속성 적용을 위한 모달창에 사용되는 이미지 미리보기 컴포넌트', | ||
}, | ||
}, | ||
}, | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof ImageTagModalImg>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
imageSrc: `${import.meta.env.VITE_STATIC_STORAGE_URL}boolock_logo.png`, | ||
}, | ||
render: (args) => { | ||
return ( | ||
<div className="h-32 w-32"> | ||
<ImageTagModalImg imageSrc={args.imageSrc} /> | ||
</div> | ||
); | ||
}, | ||
}; |
51 changes: 51 additions & 0 deletions
51
apps/client/src/entities/workspace/ImageTagModalList/ImageTagModalList.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { ImageTagModalList } from './ImageTagModalList'; | ||
import { useState } from 'react'; | ||
import { useImageModalStore } from '@/shared/store'; | ||
|
||
const meta: Meta<typeof ImageTagModalList> = { | ||
title: 'entities/workspace/ImageTagModalList', | ||
component: ImageTagModalList, | ||
parameters: { | ||
layout: 'centered', | ||
docs: { | ||
description: { | ||
component: 'img 태그 src 속성 적용을 위한 모달창에 사용되는 이미지 리스트 컴포넌트', | ||
}, | ||
}, | ||
}, | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof ImageTagModalList>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
tagSrc: '/mock/image2.png', | ||
onSetTagSrc: () => {}, | ||
}, | ||
render: (args) => { | ||
const [tagSrc, setTagSrc] = useState(args.tagSrc); | ||
const mockImageList = new Map([ | ||
['example1<png', '/mock/image1.png'], | ||
['example2<png', '/mock/image2.png'], | ||
['example3<png', '/mock/image3.png'], | ||
['example4<png', '/mock/image4.png'], | ||
['example5<png', '/mock/image5.png'], | ||
]); | ||
|
||
const imageList = JSON.stringify(Object.fromEntries(mockImageList)); | ||
|
||
const { setInitialImageList } = useImageModalStore.getState(); | ||
setInitialImageList(imageList); | ||
|
||
return ( | ||
<div className="h-[32rem]"> | ||
<ImageTagModalList tagSrc={tagSrc} onSetTagSrc={setTagSrc} /> | ||
</div> | ||
); | ||
}, | ||
}; |
83 changes: 83 additions & 0 deletions
83
apps/client/src/entities/workspace/ImageTagModalListItem/ImageTagModalListItem.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { ImageTagModalListItem } from '../ImageTagModalListItem/ImageTagModalListItem'; | ||
import { useState } from 'react'; | ||
|
||
const meta: Meta<typeof ImageTagModalListItem> = { | ||
title: 'entities/workspace/ImageTagModalListItem', | ||
component: ImageTagModalListItem, | ||
parameters: { | ||
layout: 'centered', | ||
docs: { | ||
description: { | ||
component: 'img 태그 src 속성 적용을 위한 모달창에 사용되는 이미지 리스트 아이템 컴포넌트', | ||
}, | ||
}, | ||
}, | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof ImageTagModalListItem>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
isSelected: false, | ||
onDeleteImage: () => {}, | ||
onSelectImage: () => {}, | ||
filename: 'logo.png', | ||
}, | ||
render: (args) => { | ||
return ( | ||
<ImageTagModalListItem | ||
isSelected={args.isSelected} | ||
onDeleteImage={args.onDeleteImage} | ||
onSelectImage={args.onSelectImage} | ||
filename={args.filename} | ||
/> | ||
); | ||
}, | ||
}; | ||
|
||
export const Selected: Story = { | ||
args: { | ||
isSelected: true, | ||
onDeleteImage: () => {}, | ||
onSelectImage: () => {}, | ||
filename: 'logo.png', | ||
}, | ||
render: (args) => { | ||
return ( | ||
<ImageTagModalListItem | ||
isSelected={args.isSelected} | ||
onDeleteImage={args.onDeleteImage} | ||
onSelectImage={args.onSelectImage} | ||
filename={args.filename} | ||
/> | ||
); | ||
}, | ||
}; | ||
|
||
export const ActiveAndResize: Story = { | ||
args: { | ||
isSelected: false, | ||
onDeleteImage: () => {}, | ||
onSelectImage: () => {}, | ||
filename: 'logo.png', | ||
}, | ||
render: (args) => { | ||
const [isSelected, setIsSelected] = useState<boolean>(args.isSelected); | ||
|
||
return ( | ||
<div style={{ width: '400px', resize: 'horizontal', overflow: 'auto' }}> | ||
<ImageTagModalListItem | ||
isSelected={isSelected} | ||
onDeleteImage={args.onDeleteImage} | ||
onSelectImage={() => setIsSelected(!isSelected)} | ||
filename={args.filename} | ||
/> | ||
</div> | ||
); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { ErrorPage } from './ErrorPage'; | ||
|
||
const meta: Meta<typeof ErrorPage> = { | ||
title: 'pages/ErrorPage', | ||
component: ErrorPage, | ||
parameters: { | ||
layout: 'fullscreen', | ||
}, | ||
decorators: [ | ||
(Story) => { | ||
return ( | ||
<div className="flex h-screen w-screen flex-1"> | ||
<Story /> | ||
</div> | ||
); | ||
}, | ||
], | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof ErrorPage>; | ||
|
||
export const Default: Story = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.