-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
Styles.jsx
70 lines (68 loc) · 1.69 KB
/
Styles.jsx
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import React, {Fragment} from 'react'
import GlobalStyles from '@mui/material/GlobalStyles'
/**
* @property {object} theme To set link, icon and scrollbar colors.
* @return {React.Component}
*/
export default function Styles({theme}) {
// For performance
// See https://mui.com/material-ui/customization/how-to-customize/#4-global-css-override
const globalStyles = (
<GlobalStyles
styles={{
'body': {
overscrollBehavior: 'none',
overflow: 'hidden',
padding: 0,
height: '100%',
maxHeight: '100%',
},
'@media (max-width: 768px)': {
html: {
height: '100%',
maxHeight: '100%',
overflow: 'hidden',
overscrollBehavior: 'none',
},
body: {
position: 'fixed',
left: 0,
top: 0,
right: 0,
bottom: 0,
maxHeight: '100%',
},
},
'a': {
color: theme.palette.primary.main,
},
'.no-select': {
userSelect: 'none',
},
'.icon-share': {
width: '40px',
height: '40px',
fill: theme.palette.primary.contrastText,
},
'.icon-small': {
width: '15px',
height: '15px',
},
/* icon-nav-* are the sub-icons in NavTree */
'.icon-nav-caret': {
width: '12px',
height: '12px',
},
'.icon-nav-eye': {
width: '12px',
height: '12px',
},
'.icon-nav-glasses': {
width: '12px',
height: '12px',
},
}}
/>
)
return <Fragment>{globalStyles}</Fragment>
}