Skip to content

Commit 1649a6a

Browse files
refactor(overmind-devtools): improve size indiation of arrays and objects
1 parent ac66d10 commit 1649a6a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ const Nested: SFC<NestedProps> = ({
3838
{path.length ? (
3939
<span className={styles.key}>{path[path.length - 1]}:</span>
4040
) : null}
41-
{startBracket} {isArray ? keys.length : keys.slice(0, 3).join(', ')}{' '}
41+
{startBracket}
42+
<span className={styles.keyCount}>
43+
{isArray
44+
? keys.length + ' items'
45+
: keys.slice(0, 3).join(', ') + '...'}
46+
</span>
4247
{endBracket}
4348
</div>
4449
)

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,8 @@ export const genericValue = css`
3636
export const nestedChildren = css`
3737
padding-left: 1rem;
3838
`
39+
40+
export const keyCount = css`
41+
font-size: var(--font-size-2);
42+
color: var(--color-white-4);
43+
`

0 commit comments

Comments
 (0)