-
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.
- Loading branch information
1 parent
013e487
commit ec4ef84
Showing
6 changed files
with
221 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom/client"; | ||
import { ThemeProvider } from "styled-components"; | ||
import mainTheme from "./styles/mainTheme"; | ||
import GlobalStyle from "./styles/GlobalStyles"; | ||
|
||
ReactDOM.createRoot(document.getElementById("root")!).render( | ||
<React.StrictMode> | ||
<div /> | ||
</React.StrictMode> | ||
<ThemeProvider theme={mainTheme}> | ||
<GlobalStyle /> | ||
<div /> | ||
</ThemeProvider> | ||
</React.StrictMode>, | ||
); |
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,36 @@ | ||
import { createGlobalStyle } from "styled-components"; | ||
|
||
const GlobalStyle = createGlobalStyle` | ||
This comment has been minimized.
Sorry, something went wrong. |
||
*, | ||
::after, | ||
::before{ | ||
box-sizing: border-box; | ||
} | ||
h1,h2,body{ | ||
margin: 0; | ||
padding:0; | ||
} | ||
button{ | ||
margin:0; | ||
background-color: transparent; | ||
padding: 0; | ||
} | ||
ul{ | ||
list-style: none; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
body{ | ||
font-family: ${({ theme }) => theme.typography["main-font-fammily"]}; | ||
color: ${({ theme }) => theme.color.font}; | ||
background-color: ${({ theme }) => theme.color.main}; | ||
} | ||
`; | ||
|
||
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,18 @@ | ||
import { DefaultTheme } from "styled-components"; | ||
|
||
const mainTheme: DefaultTheme = { | ||
color: { | ||
main: "#fbd000", | ||
secondary: "#049cd8", | ||
"error-background": "#e52521", | ||
"check-background": "#43b047", | ||
font: "#fff", | ||
"secondary-font": "#000", | ||
}, | ||
typography: { | ||
"main-font-fammily": "Verdana, Geneva, Tahoma, sans-serif", | ||
"secondary-font-family": "'New Super Mario Font U', sans-serif", | ||
}, | ||
}; | ||
|
||
export default mainTheme; |
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,19 @@ | ||
import "styled-components"; | ||
|
||
declare module "styled-components" { | ||
export interface DefaultTheme { | ||
color: { | ||
main: string; | ||
secondary: string; | ||
"error-background": string; | ||
"check-background": string; | ||
font: string; | ||
"secondary-font": string; | ||
}; | ||
|
||
typography: { | ||
"main-font-fammily": string; | ||
"secondary-font-family": string; | ||
}; | ||
} | ||
} |
Ya os lo dije ayer, revisad el naming porque no es correcto, mirad el archivo