-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Init/#6] story book 설치 및 테스트
- Loading branch information
Showing
39 changed files
with
2,025 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,5 @@ dist-ssr | |
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
*storybook.log |
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,16 @@ | ||
import type { StorybookConfig } from '@storybook/react-vite'; | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-onboarding', | ||
'@storybook/addon-essentials', | ||
'@chromatic-com/storybook', | ||
'@storybook/addon-interactions', | ||
], | ||
framework: { | ||
name: '@storybook/react-vite', | ||
options: {}, | ||
}, | ||
}; | ||
export default config; |
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 @@ | ||
<link rel="stylesheet" href="./src/styles/fonts/fonts.css" /> |
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,26 @@ | ||
import type { Preview } from '@storybook/react'; | ||
import React from 'react'; | ||
import { ThemeProvider, Global } from '@emotion/react'; | ||
import GlobalStyle from '../src/styles/global'; | ||
import theme from '../src/styles/theme'; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
}, | ||
decorators: [ | ||
(Story) => ( | ||
<ThemeProvider theme={theme}> | ||
<Global styles={GlobalStyle} /> | ||
<Story /> | ||
</ThemeProvider> | ||
), | ||
], | ||
}; | ||
|
||
export default preview; |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,10 @@ | ||
export { default as ImgMenu1 } from './ImgMenu1'; | ||
export { default as ImgMenu10 } from './ImgMenu10'; | ||
export { default as ImgMenu2 } from './ImgMenu2'; | ||
export { default as ImgMenu3 } from './ImgMenu3'; | ||
export { default as ImgMenu4 } from './ImgMenu4'; | ||
export { default as ImgMenu5 } from './ImgMenu5'; | ||
export { default as ImgMenu6 } from './ImgMenu6'; | ||
export { default as ImgMenu7 } from './ImgMenu7'; | ||
export { default as ImgMenu8 } from './ImgMenu8'; | ||
export { default as ImgMenu9 } from './ImgMenu9'; |
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,40 @@ | ||
import { Theme, css } from '@emotion/react'; | ||
import theme from 'src/styles/theme'; | ||
|
||
export const postStyleContainer = (theme: Theme) => css` | ||
display: flex; | ||
width: 16.9rem; | ||
height: 25.4rem; | ||
padding: 2.4rem 2rem; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 1.2rem; | ||
flex-shrink: 0; | ||
border-radius: 0.5rem; | ||
background-color: ${theme.colors.gray000}; | ||
`; | ||
export const imageSection = css` | ||
display: flex; | ||
height: 11rem; | ||
justify-content: center; | ||
align-items: center; | ||
flex-shrink: 0; | ||
align-self: stretch; | ||
`; | ||
|
||
export const titleSection = (theme: Theme) => css` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 0.8rem; | ||
align-self: stretch; | ||
.title__ko { | ||
color: ${theme.colors.gray600}; | ||
text-align: center; | ||
${theme.fonts.body04}; | ||
} | ||
.title__en { | ||
color: ${theme.colors.gray500}; | ||
${theme.fonts.caption01}; | ||
} | ||
`; |
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,29 @@ | ||
import { ImgMenu1 } from '@assets/svgs/buger'; | ||
import { | ||
postStyleContainer, | ||
titleSection, | ||
imageSection, | ||
} from './BugerPost.style'; | ||
import { ThemeProvider } from '@emotion/react'; | ||
import theme from 'src/styles/theme'; | ||
|
||
type BugerPostProps = { | ||
titleKo: string; | ||
titleEn: string; | ||
}; | ||
|
||
const BurgerPost = ({ titleEn, titleKo }: BugerPostProps) => ( | ||
<ThemeProvider theme={theme}> | ||
<div css={postStyleContainer}> | ||
<section css={imageSection}> | ||
<ImgMenu1 /> | ||
</section> | ||
<section css={titleSection}> | ||
<p className="title__ko">{titleKo}</p> | ||
<p className="title__en">{titleEn}</p> | ||
</section> | ||
</div> | ||
</ThemeProvider> | ||
); | ||
|
||
export default BurgerPost; |
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,16 @@ | ||
import BurgerPost from './BugerPost'; | ||
|
||
export default { | ||
title: 'Components/BurgerPost', | ||
component: BurgerPost, | ||
}; | ||
|
||
export const Default = { | ||
args: {}, | ||
}; | ||
|
||
export const Favorited = { | ||
args: { | ||
isHighlighted: true, | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,11 +1,9 @@ | ||
import { Outlet } from "react-router-dom"; | ||
import { Outlet } from 'react-router-dom'; | ||
|
||
const Layout = () => { | ||
return ( | ||
<> | ||
<Outlet /> | ||
</> | ||
); | ||
}; | ||
const Layout = () => ( | ||
<> | ||
<Outlet /> | ||
</> | ||
); | ||
|
||
export default Layout; |
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 |
---|---|---|
@@ -1,6 +1,3 @@ | ||
const Main = () => { | ||
|
||
return <div>Main</div>; | ||
}; | ||
const Main = () => <div>Main</div>; | ||
|
||
export default Main; |
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.
Binary file not shown.
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.
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.
Oops, something went wrong.