File tree Expand file tree Collapse file tree 2 files changed +24
-18
lines changed
packages/node_modules/overmind-devtools/src/components/ActionOperator Expand file tree Collapse file tree 2 files changed +24
-18
lines changed Original file line number Diff line number Diff line change 1- import { createElement , FunctionComponent } from 'react'
1+ import { createElement , FunctionComponent , Fragment } from 'react'
22import {
33 Operator as OperatorType ,
44 EventType ,
@@ -73,14 +73,18 @@ const ActionOperator: FunctionComponent<Props> = ({
7373 ? effect . name + '.' + effect . method
7474 : effect . method }
7575 </ span >
76- { effect . args . length ? (
77- < ValueInspector
78- small
79- value = {
80- effect . args . length > 1 ? effect . args : effect . args [ 0 ]
81- }
82- />
83- ) : null }
76+ < span className = { styles . effectArgs } >
77+ (
78+ { effect . args . map ( ( arg , argIndex ) => (
79+ < Fragment >
80+ < ValueInspector small value = { arg } />
81+ { argIndex === effect . args . length - 1 ? null : (
82+ < span > ,</ span >
83+ ) }
84+ </ Fragment >
85+ ) ) }
86+ )
87+ </ span >
8488 { effect . result === undefined && ! effect . error ? null : (
8589 < span
8690 className = { css (
@@ -123,14 +127,9 @@ const ActionOperator: FunctionComponent<Props> = ({
123127 >
124128 { mutation . path }
125129 </ span >
126- < ValueInspector
127- small
128- value = {
129- mutation . args . length > 1
130- ? mutation . args
131- : mutation . args [ 0 ]
132- }
133- />
130+ { mutation . args . map ( ( arg ) => (
131+ < ValueInspector small value = { arg } />
132+ ) ) }
134133 </ div >
135134 )
136135 }
Original file line number Diff line number Diff line change @@ -8,9 +8,16 @@ export const operator = css({
88 cursor : 'default' ,
99} )
1010
11+ export const effectArgs = css ( {
12+ display : 'flex' ,
13+ alignItems : 'center' ,
14+ '> span' : {
15+ marginRight : '0.5rem' ,
16+ } ,
17+ } )
18+
1119export const value = css ( {
1220 marginLeft : 'auto' ,
13- paddingRight : '0.5rem' ,
1421 display : 'flex' ,
1522 alignItems : 'center' ,
1623} )
You can’t perform that action at this time.
0 commit comments