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
58 lines (56 loc) · 1.57 KB
/
index.tsx
File metadata and controls
58 lines (56 loc) · 1.57 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
import * as React from 'react'
import { Wrapper, Button } from './elements'
import { connect, Connect } from '../../app'
import Icon from '../common/Icon'
import { Tab } from '../../app/types'
import Tooltip from '../common/Tooltip'
const Tabs: React.SFC<Connect> = ({ app }) => (
<Wrapper>
<Tooltip text="State">
<Button
active={app.state.currentTab === Tab.State}
onClick={() => app.actions.changeTab(Tab.State)}
>
<Icon>database</Icon>
</Button>
</Tooltip>
<Tooltip text="Actions">
<Button
active={app.state.currentTab === Tab.Actions}
onClick={() => app.actions.changeTab(Tab.Actions)}
>
<Icon>cogs</Icon>
</Button>
</Tooltip>
<Tooltip text="Components">
<Button
active={app.state.currentTab === Tab.Components}
onClick={() => app.actions.changeTab(Tab.Components)}
>
<Icon>code</Icon>
</Button>
</Tooltip>
<Tooltip text="Flushes">
<Button
active={app.state.currentTab === Tab.Flushes}
onClick={() => app.actions.changeTab(Tab.Flushes)}
>
<Icon>save</Icon>
</Button>
</Tooltip>
<Tooltip text="Console">
<Button
active={app.state.currentTab === Tab.Console}
onClick={() => app.actions.changeTab(Tab.Console)}
>
<Icon>terminal</Icon>
</Button>
</Tooltip>
<Tooltip text="Remove">
<Button active={false} onClick={() => app.actions.removeApp()}>
<Icon>trash</Icon>
</Button>
</Tooltip>
</Wrapper>
)
export default connect(Tabs)