-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui-kit): 섀도우 스타일, 스토리북 추가 (#21)
- Loading branch information
Showing
8 changed files
with
83 additions
and
14 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 |
---|---|---|
@@ -1,10 +1,16 @@ | ||
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); | ||
|
||
module.exports = { | ||
"stories": [ | ||
"../src/**/*.stories.mdx", | ||
"../src/**/*.stories.@(ts|tsx)" | ||
stories: [ | ||
'../src/**/*.stories.mdx', | ||
'../src/**/*.stories.@(ts|tsx)', | ||
], | ||
"addons": [ | ||
"@storybook/addon-essentials", | ||
"@storybook/preset-create-react-app" | ||
] | ||
addons: [ | ||
'@storybook/addon-essentials', | ||
'@storybook/preset-create-react-app', | ||
], | ||
webpackFinal: async (config) => { | ||
config.resolve.plugins.push(new TsconfigPathsPlugin({})); | ||
return 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
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,3 +1,4 @@ | ||
@import './font'; | ||
@import './font-weights'; | ||
@import './typography'; | ||
@import './shadows'; |
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 @@ | ||
@mixin shadow($shadow-level, $offset-y, $blur-radius) { | ||
$shadow: '0px #{$offset-y} #{$blur-radius} rgba(0, 0, 0, 0.1)'; | ||
|
||
:root { | ||
--lubycon-shadow-#{$shadow-level}: #{$shadow}; | ||
} | ||
|
||
.lubycon-shadow--#{$shadow-level} { | ||
box-shadow: #{$shadow}; | ||
box-shadow: var(--lubycon-shadow-#{$shadow-level}); | ||
} | ||
} | ||
|
||
@include shadow(1, 2px, 5px); | ||
@include shadow(2, 3px, 5px); | ||
@include shadow(3, 6px, 10px); | ||
@include shadow(4, 8px, 12px); | ||
@include shadow(5, 24px, 48px); |
2 changes: 1 addition & 1 deletion
2
...t/src/components/Button/index.stories.tsx → ui-kit/src/stories/Button.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
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 React from 'react'; | ||
import { Meta } from '@storybook/react/types-6-0'; | ||
import clxs from 'classnames'; | ||
import Text from 'components/Text'; | ||
|
||
export default { | ||
title: 'Lubycon UI Kit/Shadows', | ||
} as Meta; | ||
|
||
const shadows = ['0px', '2px 드랍다운', '3px 버튼, 카드', '6px 토스트', '8px 탭', '24px 모달 팝업']; | ||
|
||
export const Default = () => { | ||
return ( | ||
<ul style={{ margin: 0, padding: 0 }}> | ||
{shadows.map((shadow, index) => ( | ||
<li key={index} style={{ listStyle: 'none', marginBottom: 30 }}> | ||
<div | ||
className={clxs([`lubycon-shadow--${index}`])} | ||
style={{ | ||
display: 'flex', | ||
alignItems: 'flex-end', | ||
height: 80, | ||
borderRadius: 8, | ||
backgroundColor: '#fcfcfd', | ||
padding: 34, | ||
}} | ||
> | ||
<Text typography="content2">{shadow}</Text> | ||
</div> | ||
</li> | ||
))} | ||
</ul> | ||
); | ||
}; |
4 changes: 2 additions & 2 deletions
4
ui-kit/src/components/Text/index.stories.tsx → ui-kit/src/stories/Text.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
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