add global styles

This commit is contained in:
Chase Manning 2023-09-04 23:33:40 +03:00
commit 9ef6237f7e
2 changed files with 49 additions and 0 deletions

View file

@ -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>

View 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;