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
38 lines (35 loc) · 1.08 KB
/
index.tsx
File metadata and controls
38 lines (35 loc) · 1.08 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
import * as React from 'react'
import SplitPane from 'react-split-pane'
import { useAppState, useActions } from '../../overmind'
import ActionsList from '../ActionsList'
import Action from '../Action'
import * as styles from './styles'
import * as textStyles from '../../styles/text'
import ActionsTools from '../ActionsTools'
const Actions: React.FunctionComponent = () => {
const state = useAppState()
const actions = useActions()
return (
<div className={styles.wrapper}>
<ActionsTools />
{state.currentAction ? (
<div className={styles.columns}>
<SplitPane
split="vertical"
minSize={100}
defaultSize={state.actionsSplitSize}
onChange={(size) => actions.updateActionsSplitSize(size)}
>
<ActionsList />
<Action action={state.currentAction} />
</SplitPane>
</div>
) : (
<div className={styles.centerWrapper}>
<span className={textStyles.header}>no actions triggered...</span>
</div>
)}
</div>
)
}
export default Actions