mirror of
https://github.com/chase-manning/pokemon-js.git
synced 2025-11-14 22:28:06 +00:00
✨ add global styles
This commit is contained in:
parent
74bd8375cb
commit
9ef6237f7e
2 changed files with 49 additions and 0 deletions
src
|
|
@ -3,6 +3,7 @@ import { createRoot } from "react-dom/client";
|
|||
import { Provider } from "react-redux";
|
||||
import { store } from "./state/store";
|
||||
import App from "./App";
|
||||
import GlobalStyles from "./styles/GlobalStyles";
|
||||
|
||||
const container = document.getElementById("root")!;
|
||||
const root = createRoot(container);
|
||||
|
|
@ -10,6 +11,7 @@ const root = createRoot(container);
|
|||
root.render(
|
||||
<React.StrictMode>
|
||||
<Provider store={store}>
|
||||
<GlobalStyles />
|
||||
<App />
|
||||
</Provider>
|
||||
</React.StrictMode>
|
||||
|
|
|
|||
47
src/styles/GlobalStyles.tsx
Normal file
47
src/styles/GlobalStyles.tsx
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
import { createGlobalStyle } from "styled-components";
|
||||
|
||||
const GlobalStyle = createGlobalStyle`
|
||||
:root {
|
||||
--bg: black;
|
||||
--main: white;
|
||||
--sub: grey;
|
||||
--primary: blue;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 10px;
|
||||
color: var(--main);
|
||||
}
|
||||
|
||||
button {
|
||||
background: none;
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
input {
|
||||
border: none;
|
||||
outline: none;
|
||||
background: none;
|
||||
|
||||
// Remove arrows from number input
|
||||
&::-webkit-outer-spin-button,
|
||||
&::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
`;
|
||||
|
||||
const GlobalStyles = (): JSX.Element => {
|
||||
return <GlobalStyle />;
|
||||
};
|
||||
|
||||
export default GlobalStyles;
|
||||
Loading…
Add table
Add a link
Reference in a new issue