forked from cerebral/overmind
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.tsx
More file actions
75 lines (62 loc) · 1.46 KB
/
index.tsx
File metadata and controls
75 lines (62 loc) · 1.46 KB
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
71
72
73
74
75
import { injectGlobal } from 'emotion'
import { createOvermind } from 'overmind'
import { createElement, render } from 'overmind-components'
import Devtools from './components/Devtools'
import { config } from './overmind'
import { css } from './theme'
injectGlobal`
${css}
html, body {
margin: 0 !important;
padding: 0 !important;
height: 100%;
}
body {
overflow: hidden;
font-family: Nunito, 'helvetica neue';
background-color: var(--colors-background);
color: var(--colors-text);
line-height: 24px;
}
#app {
height: 100%;
}
.Resizer {
background: var(--colors-background);
opacity: .2;
z-index: 1;
box-sizing: border-box;
background-clip: padding-box;
}
.Resizer:hover {
transition: all 0.5s ease;
}
.Resizer.vertical {
width: 5px;
margin: 0 -5px;
border-left: 2px solid var(--colors-border);
border-right: 2px solid var(--colors-border);
opacity: 0.8;
cursor: col-resize;
}
.Resizer.vertical:hover {
opacity: 1;
}
.Resizer.disabled {
cursor: not-allowed;
}
.Resizer.disabled:hover {
border-color: transparent;
}
`
const overmind = createOvermind(config, {
devtools: false,
logProxies: true,
})
window.onerror = (_, _2, _3, _4, error) => {
overmind.actions.setError(error.message)
}
const container = document.createElement('div')
container.id = 'app'
document.body.appendChild(container)
render(overmind, () => <Devtools />, container)