generated from garronej/ts-ci
-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
index.tsx
47 lines (43 loc) · 1.37 KB
/
index.tsx
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
47
import { render } from "react-dom";
//NOTE: If makeStyles was located in src/app we would write: import { makeStyles } from "app/makeStyles";
import { makeStyles } from "makeStyles";
import { GlobalStyles } from "tss-react";
const useStyles = makeStyles()(theme => ({
"root": {
"& > h1:nth-child(2)": {
"color": theme.limeGreen,
},
},
}));
function App(props: { className?: string; }) {
const { className } = props;
const { classes, css, cx } = useStyles();
return (
<>
<GlobalStyles
styles={{
"body": {
"backgroundColor": "pink"
},
".foo": {
"color": "cyan"
}
}}
/>
<div className={classes.root}>
<h1>Black</h1>
<h1>Should be lime green</h1>
<h1
className={cx(
css({ "border": "1px solid black" }),
className
)}
>
Black, should have border and shadow
</h1>
<h1 className="foo">Should be cyan</h1>
</div>
</>
);
}
render(<App className={css({ "boxShadow": "10px 5px 5px teal" })} />, document.getElementById("root"));