-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/prgrms-web-devcourse/Team-0…
…8-Final-FE into feat/#414
- Loading branch information
Showing
54 changed files
with
3,392 additions
and
1,913 deletions.
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,4 @@ | ||
export const DATA_URL = { | ||
placeholder: | ||
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdjWL9+/X8ABysDDapsaG4AAAAASUVORK5CYII=', // data url for placeholder color (#AFAFAF) | ||
}; |
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,21 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import Avatar from '@/ui/Base/Avatar'; | ||
|
||
const meta: Meta<typeof Avatar> = { | ||
title: 'Base/Avatar', | ||
component: Avatar, | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof Avatar>; | ||
|
||
export const Default: Story = { | ||
args: {}, | ||
}; | ||
|
||
export const WithSrc: Story = { | ||
args: { src: '/icons/logo.svg', name: 'dadok', size: 'large' }, | ||
}; |
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,43 @@ | ||
import Bookshelf from '@/ui/Bookshelf'; | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
const meta: Meta<typeof Bookshelf> = { | ||
title: 'Bookshelf/Bookshelf', | ||
component: Bookshelf, | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof Bookshelf>; | ||
|
||
// TODO: 스토리북에서 이미지를 불러올 때 발생하는 CORS 이슈 해결 | ||
export const Default: Story = { | ||
args: { | ||
bookshelfId: 9, | ||
bookshelfName: '백민종님의 책장', | ||
books: [ | ||
{ | ||
bookId: 3, | ||
title: '리액트를 다루는 기술', | ||
imageUrl: '/images/book-cover/book1.jpeg', | ||
}, | ||
{ | ||
bookId: 11, | ||
title: '모던 자바스크립트 Deep Dive', | ||
imageUrl: '/images/book-cover/book2.jpeg', | ||
}, | ||
{ | ||
bookId: 22, | ||
title: '이펙티브 타입스크립트', | ||
imageUrl: '/images/book-cover/book3.jpeg', | ||
}, | ||
{ | ||
bookId: 23, | ||
title: '리팩터링 2판', | ||
imageUrl: '/images/book-cover/book4.jpeg', | ||
}, | ||
], | ||
likeCount: 3, | ||
}, | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import FloatingButton from '@/ui/Base/FloatingButton'; | ||
|
||
const meta: Meta<typeof FloatingButton> = { | ||
title: 'Base/FloatingButton', | ||
component: FloatingButton, | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof FloatingButton>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
position: 'bottom-right', | ||
}, | ||
render: args => <FloatingButton {...args} />, | ||
}; |
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,62 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import Button from '@/ui/Base/Button'; | ||
import useToast from '@/ui/Base/Toast/useToast'; | ||
import ToastItem from '@/ui/Base/Toast/ToastItem'; | ||
|
||
const meta: Meta<typeof ToastItem> = { | ||
title: 'Base/Toast', | ||
component: ToastItem, | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof ToastItem>; | ||
|
||
const NormalToast = () => { | ||
const toast = useToast(); | ||
const handleButtonClick = () => | ||
toast.show({ | ||
type: 'normal', | ||
message: '5초 동안 보여지는 토스트 메세지에요.', | ||
duration: 5000, | ||
}); | ||
|
||
return <Button onClick={handleButtonClick}>토스트 띄우기</Button>; | ||
}; | ||
|
||
const SuccessToast = () => { | ||
const toast = useToast(); | ||
const handleButtonClick = () => | ||
toast.show({ type: 'success', message: '링크가 복사되었어요' }); | ||
|
||
return <Button onClick={handleButtonClick}>링크 복사하기</Button>; | ||
}; | ||
|
||
const ErrorToast = () => { | ||
const toast = useToast(); | ||
const handleButtonClick = () => | ||
toast.show({ type: 'error', message: '잠시 후 다시 시도해주세요' }); | ||
|
||
return <Button onClick={handleButtonClick}>재시도</Button>; | ||
}; | ||
|
||
export const Default: Story = { | ||
args: { | ||
message: '토스트 예시', | ||
}, | ||
render: args => <ToastItem {...args} />, | ||
}; | ||
|
||
export const Normal: Story = { | ||
render: NormalToast, | ||
}; | ||
|
||
export const Success: Story = { | ||
render: SuccessToast, | ||
}; | ||
|
||
export const Error: Story = { | ||
render: ErrorToast, | ||
}; |
Oops, something went wrong.