-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathhostTheme.ts
More file actions
57 lines (55 loc) · 985 Bytes
/
hostTheme.ts
File metadata and controls
57 lines (55 loc) · 985 Bytes
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
import { extendTheme } from "@chakra-ui/react"
/**
* Mirrors consuming project's theme's z-index.ts
* and the component overrides that reference those tokens (tooltip, modal, popover).
*/
const zIndices = {
hide: -1,
auto: "auto" as const,
base: 0,
docked: 10,
dropdown: 1000,
sticky: 1100,
banner: 1200,
overlay: 1300,
modal: 2100,
popover: 2000,
skipLink: 1600,
toast: 1700,
tooltip: 2200,
}
export const hostTheme = extendTheme({
zIndices,
styles: {
global: {
html: { overflow: "hidden" },
},
},
components: {
Tooltip: {
baseStyle: {
zIndex: "tooltip",
},
},
Popover: {
baseStyle: {
popper: {
zIndex: "popover",
},
},
},
Modal: {
baseStyle: {
overlay: {
zIndex: "modal",
},
dialogContainer: {
zIndex: "modal",
},
dialog: {
zIndex: "modal",
},
},
},
},
})