-
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.
SKRF-117,SKRF-118 init : emotion관련 기능 세팅 (#2)
* install : @emotion/css 설치 * chore : projdev name didi => SpaceClub 변경 * style : 글로벌 스타일 파일 작성 * style : theme파일 작성 * style : theme, global style 적용 * install : vite-tsconfig-paths 설치 * install : vite-tsconfig-paths 설치 * fix : 타입별칭 오류 수정 * chore : name lowercase로 변경
- Loading branch information
Showing
8 changed files
with
196 additions
and
25 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,14 @@ | ||
import { css } from '@emotion/react'; | ||
|
||
const GlobalStyle = css` | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
body { | ||
box-sizing: border-box; | ||
} | ||
`; | ||
|
||
export default GlobalStyle; |
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,42 @@ | ||
import { ThemeProvider, keyframes } from '@emotion/react'; | ||
|
||
const color = { | ||
//codes for test | ||
primary: '#03c75a', | ||
secondary: '#ff5a03', | ||
white: '#ffffff', | ||
black: '#000000', | ||
gray: '#f0f0f0', | ||
} as const; | ||
|
||
const componentStyle = { | ||
input: { | ||
borderRadius: '5px', | ||
}, | ||
}; | ||
|
||
const keyframe = { | ||
fadeIn: keyframes` | ||
from { | ||
opacity: 0; | ||
} | ||
to { | ||
opacity: 1; | ||
}`, | ||
fadeOut: keyframes` | ||
from { | ||
opacity: 1; | ||
} | ||
to { | ||
opacity: 0; | ||
} | ||
`, | ||
}; | ||
|
||
const Theme = { | ||
color, | ||
componentStyle, | ||
keyframe, | ||
}; | ||
|
||
export default 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import '@emotion/react'; | ||
import Theme from './Theme'; | ||
|
||
type ThemeType = typeof Theme; | ||
|
||
declare module '@emotion/react' { | ||
export interface Theme extends ThemeType {} | ||
} |
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,7 +1,8 @@ | ||
import { defineConfig } from 'vite' | ||
import react from '@vitejs/plugin-react-swc' | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react-swc'; | ||
import tsconfigPaths from 'vite-tsconfig-paths'; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [react()], | ||
}) | ||
plugins: [react(), tsconfigPaths()], | ||
}); |