-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
46 lines (42 loc) · 1.24 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import React from "react";
import ReactDOM from "react-dom/client";
import "./index.css";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
import { Global, css, ThemeProvider } from "@emotion/react";
// You first need to add the module 🔥
import StyledTools from "styled-tools-core";
// Then you can decorate your theme with our function 🚀
const { theme, globals } = StyledTools({
colors: {
nevinha: {
primary: "red"
},
background: "#000",
primary: "hotpink",
},
base: {
fontSize: "16px",
},
});
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<React.StrictMode>
<ThemeProvider theme={theme}>
{/* Since we map all the theme properties to css-variables
you need to take our globals variable and pass it to the
Global component of your css-in-js library 🙂
*/}
<Global
styles={css`
${globals}
`}
/>
<App />
</ThemeProvider>
</React.StrictMode>
);
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();