-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DESIGN] 디자인 시스템 세팅 #4
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
696089b
design: 디자인 시스템 color 추가 (#2)
AAminha e6c4215
design: 디자인 시스템 typo 추가 (#2)
AAminha 4d4f8f2
rename: style 관련 폴더 구조 변경 및 theme.ts 내부 요소 분리 (#2)
AAminha 3a2eda2
design: 디자인 시스템 breakpoint 추가 (#2)
AAminha 203b571
style: 누락 코드(DeviceTypes 타입 선언) 추가
AAminha 9142440
design: 컬러 값(bgModal) 추가
AAminha 20be0b6
chore: `styled-reset` 추가 및 적용
AAminha c4d45a2
style: 컬러값 오타 수정
AAminha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Empty file.
This file was deleted.
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,33 @@ | ||
import { createGlobalStyle } from 'styled-components'; | ||
|
||
export const GlobalFont = createGlobalStyle` | ||
@font-face { | ||
font-family: 'Spoqa Han Sans Neo'; | ||
font-style: normal; | ||
src: url('../assets/fonts/SpoqaHanSansNeo-Bold.woff2') format('woff2'), | ||
} | ||
|
||
@font-face { | ||
font-family: 'Spoqa Han Sans Neo'; | ||
font-style: normal; | ||
src: url('../assets/fonts/SpoqaHanSansNeo-Medium.woff2') format('woff2'), | ||
} | ||
|
||
@font-face { | ||
font-family: 'Spoqa Han Sans Neo'; | ||
font-style: normal; | ||
src: url('../assets/fonts/SpoqaHanSansNeo-Regular.woff2') format('woff2'), | ||
} | ||
|
||
@font-face { | ||
font-family: 'Spoqa Han Sans Neo'; | ||
font-style: normal; | ||
src: url('../assets/fonts/SpoqaHanSansNeo-Light.woff2') format('woff2'), | ||
} | ||
|
||
@font-face { | ||
font-family: 'Spoqa Han Sans Neo'; | ||
font-style: normal; | ||
src: url('../assets/fonts/SpoqaHanSansNeo-Thin.woff2') format('woff2'), | ||
} | ||
`; |
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,4 @@ | ||
export * from '@/styles/global/GlobalFont'; | ||
export * from '@/styles/global/GlobalStyle'; | ||
|
||
export * from '@/styles/theme/theme'; |
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,9 +1,10 @@ | ||
import { ColorTypes, DeviceTypes, FontTypes } from '@/styles/theme/theme'; | ||
import 'styled-components'; | ||
import { ColorsTypes, FontsTypes } from './theme'; | ||
|
||
declare module 'styled-components' { | ||
export interface DefaultTheme { | ||
colors: ColorsTypes; | ||
fonts: FontsTypes; | ||
color: ColorTypes; | ||
font: FontTypes; | ||
device: DeviceTypes; | ||
} | ||
} |
This file was deleted.
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,45 @@ | ||
export const color = { | ||
black: '#000000', | ||
white: '#ffffff', | ||
|
||
// Primary | ||
primary900: '#3d2669', | ||
primary800: '#50328a', | ||
primary700: '#6740b2', | ||
primary600: '#8452e4', | ||
primary500: '#915afb', | ||
primary400: '#a77bfc', | ||
primary300: '#b590fc', | ||
primary200: '#ccb3fd', | ||
primary100: '#ddccfe', | ||
primary50: '#f4efff', | ||
|
||
// Secondary | ||
secondary900: '#66273b', | ||
secondary800: '#86334e', | ||
secondary700: '#ad4164', | ||
secondary600: '#de5480', | ||
secondary500: '#f45c8d', | ||
secondary400: '#f67da4', | ||
secondary300: '#f892b3', | ||
secondary200: '#fab4cb', | ||
secondary100: '#fcccdc', | ||
secondary50: '#feeff4', | ||
|
||
// Gray Scale | ||
gray900: '#171717', | ||
gray800: '#242424', | ||
gray700: '#333333', | ||
gray600: '#555555', | ||
gray500: '#6f6f6f', | ||
gray400: '#8b8b8b', | ||
gray300: '#a5a5a5', | ||
gray250: '#c1c1c1', | ||
gray200: '#dfdfdf', | ||
gray150: '#efefef', | ||
gray100: '#f7f7f7', | ||
gray50: '#fbfbfb', | ||
|
||
// etc | ||
bgModal: 'rgba(18, 18, 18, 0.36)', | ||
} as const; |
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,11 @@ | ||
const deviceSizes = { | ||
mobile: '320px', | ||
tablet: '600px', | ||
desktop: '1280px', | ||
}; | ||
|
||
export const device = { | ||
mobile: `screen and (min-width: ${deviceSizes.mobile}) and (max-width: ${deviceSizes.tablet})`, | ||
tablet: `screen and (min-width: ${deviceSizes.tablet}) and (max-width: ${deviceSizes.desktop})`, | ||
desktop: `screen and (min-width: ${deviceSizes.desktop})`, | ||
}; |
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,178 @@ | ||
interface Font { | ||
font: string; | ||
weight: number; | ||
size: number; | ||
lineHeight: number; | ||
} | ||
|
||
const FONT = ({ font, weight, size, lineHeight }: Font): string => { | ||
return ` | ||
font-family : "${font}"; | ||
font-weight: ${weight}; | ||
font-size : ${size}px; | ||
line-height : ${lineHeight}px; | ||
`; | ||
}; | ||
|
||
export const font = { | ||
desktop: { | ||
d1: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 700, | ||
size: 82, | ||
lineHeight: 100, | ||
}), | ||
d2: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 500, | ||
size: 65, | ||
lineHeight: 80, | ||
}), | ||
h1: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 700, | ||
size: 50, | ||
lineHeight: 60, | ||
}), | ||
h2: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 400, | ||
size: 40, | ||
lineHeight: 50, | ||
}), | ||
title1: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 700, | ||
size: 32, | ||
lineHeight: 40, | ||
}), | ||
title2: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 500, | ||
size: 25, | ||
lineHeight: 32, | ||
}), | ||
body1m: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 500, | ||
size: 18, | ||
lineHeight: 28, | ||
}), | ||
body1r: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 400, | ||
size: 18, | ||
lineHeight: 28, | ||
}), | ||
body2m: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 500, | ||
size: 16, | ||
lineHeight: 24, | ||
}), | ||
body2r: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 400, | ||
size: 16, | ||
lineHeight: 24, | ||
}), | ||
label1m: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 500, | ||
size: 14, | ||
lineHeight: 20, | ||
}), | ||
label1r: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 400, | ||
size: 14, | ||
lineHeight: 20, | ||
}), | ||
label2: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 500, | ||
size: 12, | ||
lineHeight: 20, | ||
}), | ||
}, | ||
mobile: { | ||
d1: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 500, | ||
size: 58, | ||
lineHeight: 64, | ||
}), | ||
d2: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 500, | ||
size: 45, | ||
lineHeight: 56, | ||
}), | ||
h1: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 500, | ||
size: 36, | ||
lineHeight: 44, | ||
}), | ||
h2: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 500, | ||
size: 28, | ||
lineHeight: 32, | ||
}), | ||
title1: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 700, | ||
size: 22, | ||
lineHeight: 28, | ||
}), | ||
title2: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 500, | ||
size: 16, | ||
lineHeight: 24, | ||
}), | ||
body1m: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 500, | ||
size: 16, | ||
lineHeight: 24, | ||
}), | ||
body1r: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 400, | ||
size: 16, | ||
lineHeight: 24, | ||
}), | ||
body2m: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 500, | ||
size: 14, | ||
lineHeight: 20, | ||
}), | ||
body2r: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 400, | ||
size: 14, | ||
lineHeight: 20, | ||
}), | ||
label1m: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 500, | ||
size: 14, | ||
lineHeight: 20, | ||
}), | ||
label1r: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 400, | ||
size: 14, | ||
lineHeight: 20, | ||
}), | ||
label2: FONT({ | ||
font: 'Spoqa Han Sans Neo', | ||
weight: 500, | ||
size: 12, | ||
lineHeight: 20, | ||
}), | ||
}, | ||
}; |
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,14 @@ | ||
import { DefaultTheme } from 'styled-components'; | ||
|
||
import { color } from '@/styles/theme/color'; | ||
import { device } from '@/styles/theme/device'; | ||
import { font } from '@/styles/theme/font'; | ||
|
||
export type ColorTypes = typeof color; | ||
export type FontTypes = typeof font; | ||
export type DeviceTypes = typeof device; | ||
export const theme: DefaultTheme = { | ||
color, | ||
font, | ||
device, | ||
}; |
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 |
---|---|---|
|
@@ -2747,6 +2747,11 @@ styled-components@^6.1.8: | |
stylis "4.3.1" | ||
tslib "2.5.0" | ||
|
||
styled-reset@^4.5.2: | ||
version "4.5.2" | ||
resolved "https://registry.yarnpkg.com/styled-reset/-/styled-reset-4.5.2.tgz#2eba489fce52e34368693adb8d5fb4bf775edc3c" | ||
integrity sha512-dbAaaVEhweBs2FGfqGBdW6oMcMK8238C2X5KCxBhUQJX92m/QyUfzRADOXhdXiXNkIPELtMCd72YY9eCdORfIw== | ||
|
||
[email protected]: | ||
version "4.3.1" | ||
resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.3.1.tgz#ed8a9ebf9f76fe1e12d462f5cc3c4c980b23a7eb" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기 18 -> 12로 수정해주세요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인해봤는데 이건 틀린 게 없는 것 같아요..!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
헉 그렇네요 수고하셨습니다!