-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from zoopi-palette/feat/emotion-setup
Feat/emotion setup
- Loading branch information
Showing
9 changed files
with
386 additions
and
202 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
presets: [ | ||
"next/babel", | ||
], | ||
plugins: ["@emotion"] | ||
} |
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,8 +1,14 @@ | ||
import "../styles/globals.css" | ||
import type {AppProps} from "next/app" | ||
import {GlobalStyle} from "styles/globalStyle" | ||
import {ThemeProvider} from "styles/theme" | ||
|
||
function MyApp({Component, pageProps}: AppProps) { | ||
return <Component {...pageProps} /> | ||
return ( | ||
<ThemeProvider> | ||
<GlobalStyle/> | ||
<Component {...pageProps} /> | ||
</ThemeProvider> | ||
) | ||
} | ||
|
||
export default MyApp |
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 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,46 @@ | ||
import {Global, css} from "@emotion/react" | ||
import reset from "emotion-reset" | ||
|
||
export const GlobalStyle = () => { | ||
return (<Global styles={css` | ||
${reset} | ||
* { | ||
box-sizing: border-box; | ||
} | ||
body { | ||
width:100%; | ||
overflow-x:hidden; | ||
} | ||
html { | ||
font-size: 16px; | ||
scroll-behavior: smooth; | ||
width:100%; | ||
overflow-x:hidden; | ||
} | ||
div, section, header, footer { | ||
display: flex; | ||
} | ||
button { | ||
border:none; | ||
outline:none; | ||
background: none; | ||
box-shadow: none; | ||
cursor: pointer; | ||
} | ||
a { | ||
text-decoration: none; | ||
} | ||
input { | ||
border:none; | ||
outline:none; | ||
:focus-visible{ | ||
outline: none; | ||
} | ||
} | ||
`}/>) | ||
} |
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,34 @@ | ||
import {ThemeProvider as EmotionThemeProvider, ThemeProviderProps} from "@emotion/react" | ||
|
||
const palette = { | ||
"grey-10": "#FDFDFD", | ||
"grey-20": "#F7F8F9", | ||
"grey-30": "#E9EBEE", | ||
"grey-40": "#C5C8CE", | ||
"grey-50": "#8B95A0", | ||
"grey-60": "#646F7C", | ||
"grey-70": "#374553", | ||
"grey-80": "#28323C", | ||
"grey-90": "#161D24", | ||
} | ||
|
||
const theme = { | ||
colors: { | ||
...palette, | ||
main: "#FF3E3D", | ||
sub: "#3B91F5", | ||
error: "#FF6A3A", | ||
success: "#4EC28A", | ||
}, | ||
zIndex: { | ||
modal: 100 | ||
} | ||
} | ||
|
||
export const ThemeProvider = ({children}: {children: React.ReactNode}) => { | ||
return ( | ||
<EmotionThemeProvider theme={theme}> | ||
{children} | ||
</EmotionThemeProvider> | ||
) | ||
} |
Oops, something went wrong.