Skip to content

Commit 08bc94e

Browse files
feat(overmind-devtools): history
1 parent 4d0e2f9 commit 08bc94e

File tree

32 files changed

+318
-102
lines changed

32 files changed

+318
-102
lines changed

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"react": "16.8.1",
4949
"react-dom": "16.8.1",
5050
"react-hot-loader": "^4.3.4",
51+
"react-icons": "^3.5.0",
5152
"styled-components": "3.3.3",
5253
"tslib": "1.9.3",
5354
"vue": "2.5.16",

packages/node_modules/overmind-devtools/src/components/Action/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { createElement, SFC } from 'react'
1+
import { createElement, FunctionComponent } from 'react'
22
import { useOvermind } from '../../overmind'
33
import * as styles from './styles'
44
import ActionOperator from '../ActionOperator'
55
import Flush from '../ActionFlush'
66
import { getActionId, getOperatorId } from '../../overmind/utils'
77

8-
const Action: SFC = () => {
8+
const Action: FunctionComponent = () => {
99
const { state } = useOvermind()
1010
const flushReference =
1111
state.currentApp.flushByActionId[getActionId(state.currentAction)]

packages/node_modules/overmind-devtools/src/components/ActionFlush/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import * as actionStyles from '../Action/styles'
55
import * as styles from './styles'
66
import * as textStyles from '../../styles/text'
77
import Path from '../ActionPath'
8-
import Icon from '../common/Icon'
98
import { css } from 'emotion'
9+
import { FaCode, FaLink } from 'react-icons/fa'
1010

1111
type Props = {
1212
flush: FlushType
@@ -24,8 +24,8 @@ const ActionFlush: FunctionComponent<Props> = ({ flush }) => {
2424
{flush.components.map((componentId) => (
2525
<div key={componentId}>
2626
<span className={css(textStyles.description, styles.flushItem)}>
27-
<span className={styles.fadedOut}>
28-
<Icon>code</Icon>
27+
<span className={styles.icon}>
28+
<FaCode />
2929
</span>{' '}
3030
{state.currentApp.components[componentId].name}
3131
</span>
@@ -34,8 +34,8 @@ const ActionFlush: FunctionComponent<Props> = ({ flush }) => {
3434
{flush.derived.map((derivedPath, index) => (
3535
<div key={derivedPath + '_' + index}>
3636
<span className={css(textStyles.description, styles.flushItem)}>
37-
<span className={styles.fadedOut}>
38-
<Icon>chain</Icon>
37+
<span className={styles.icon}>
38+
<FaLink />
3939
</span>{' '}
4040
{derivedPath}
4141
</span>

packages/node_modules/overmind-devtools/src/components/ActionFlush/styles.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ export const flushItem = css({
3434
},
3535
})
3636

37-
export const fadedOut = css({
37+
export const icon = css({
3838
opacity: 0.75,
39+
display: 'flex',
40+
alignItems: 'center',
3941
})

packages/node_modules/overmind-devtools/src/components/ActionOperator/index.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import { createElement, SFC } from 'react'
2-
import { useOvermind } from '../../overmind'
1+
import { createElement, FunctionComponent } from 'react'
32
import {
43
Operator as OperatorType,
54
EventType,
65
Effect,
76
Mutation,
87
} from '../../overmind/types'
98
import ValueInspector from '../ValueInspector'
10-
import Icon from '../common/Icon'
119
import Path from '../ActionPath'
1210
import * as styles from './styles'
1311
import * as actionStyles from '../Action/styles'
@@ -22,7 +20,11 @@ type Props = {
2220
operatorIndex: number
2321
}
2422

25-
const ActionOperator: SFC<Props> = ({ prevOperator, operator, value }) => {
23+
const ActionOperator: FunctionComponent<Props> = ({
24+
prevOperator,
25+
operator,
26+
value,
27+
}) => {
2628
return (
2729
<div className={actionStyles.pipe}>
2830
<Path

packages/node_modules/overmind-devtools/src/components/ActionPath/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
import { createElement, SFC } from 'react'
1+
import { createElement, FunctionComponent } from 'react'
22
import * as styles from './styles'
33

44
type Props = {
55
visible?: boolean
66
showPathTag?: boolean
77
}
88

9-
const ActionPath: SFC<Props> = ({ showPathTag = true, visible, children }) => (
9+
const ActionPath: FunctionComponent<Props> = ({
10+
showPathTag = true,
11+
visible,
12+
children,
13+
}) => (
1014
<div className={styles.path(visible)}>
1115
<div className={styles.pathLine} />
1216
{children ? (

packages/node_modules/overmind-devtools/src/components/ActionPayload/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createElement, FunctionComponent, Fragment, useState } from 'react'
1+
import { createElement, FunctionComponent } from 'react'
22
import * as styles from './styles'
33
import { useOvermind } from '../../overmind'
44
import { isValidJson } from '../../overmind/utils'

packages/node_modules/overmind-devtools/src/components/ActionsList/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { createElement, SFC } from 'react'
1+
import { createElement, FunctionComponent } from 'react'
22
import { useOvermind } from '../../overmind'
33
import { ActionsListItemType } from '../../overmind/types'
44
import { nameToColor } from '../../overmind/utils'
55
import * as textStyles from '../../styles/text'
66
import * as styles from './styles'
77
import { css } from 'emotion'
88

9-
const ActionsList: SFC = () => {
9+
const ActionsList: FunctionComponent = () => {
1010
const { state, actions } = useOvermind()
1111

1212
return (

packages/node_modules/overmind-devtools/src/components/ActionsTools/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { useOvermind } from '../../overmind'
44
import ActionSelector from '../ActionSelector'
55
import ActionPayload from '../ActionPayload'
66
import { colors } from '../../theme'
7-
import { isValidPayload } from '../../overmind/utils'
87

98
const ActionsTools: FunctionComponent = () => {
109
const { state, actions } = useOvermind()

0 commit comments

Comments
 (0)