-
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.
Style(JSX) Added global styles & fonts
npm i modern-normalize font-family: 'Roboto', sans-serif;
- Loading branch information
1 parent
02ac4ef
commit 6835804
Showing
8 changed files
with
125 additions
and
0 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
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
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 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const Container = styled.div` | ||
width: 100%; | ||
margin: 0 auto; | ||
@media screen and (min-width: 375px) { | ||
width: 375px; | ||
} | ||
@media screen and (min-width: 768px) { | ||
width: 768px; | ||
} | ||
@media screen and (min-width: 1440px) { | ||
width: 1440px; | ||
} | ||
`; |
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,87 @@ | ||
import { createGlobalStyle } from 'styled-components'; | ||
import 'modern-normalize'; | ||
import RobotoRegular from '../fonts/Roboto-Regular.ttf'; | ||
import RobotoMedium from '../fonts/Roboto-Medium.ttf'; | ||
import RobotoBold from '../fonts/Roboto-Bold.ttf'; | ||
|
||
const GlobalStyle = createGlobalStyle` | ||
@font-face { | ||
font-family: 'RobotoRegular'; | ||
src: local('RobotoRegular'), | ||
url(${RobotoRegular}) format('truetype'); | ||
font-weight: 400; | ||
font-style: normal; | ||
} | ||
@font-face { | ||
font-family: 'RobotoMedium'; | ||
src: local('RobotoMedium'), | ||
url(${RobotoMedium}) format('truetype'); | ||
font-weight: 500; | ||
font-style: normal; | ||
} | ||
@font-face { | ||
font-family: 'RobotoBold'; | ||
src: local('RobotoBold'), | ||
url(${RobotoBold}) format('truetype'); | ||
font-weight: 700; | ||
font-style: normal; | ||
} | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
font-family: 'Roboto', sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
code { | ||
font-family: 'Roboto', sans-serif; | ||
} | ||
a { | ||
text-decoration: none; | ||
color: currentColor; | ||
} | ||
p { | ||
padding: 0; | ||
margin: 0; | ||
} | ||
ul, | ||
ol { | ||
list-style: none; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6 { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
img { | ||
display: block; | ||
max-width: 100%; | ||
height: auto; | ||
} | ||
button { | ||
cursor: pointer; | ||
border: none; | ||
} | ||
`; | ||
|
||
export default GlobalStyle; |