Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(devtools): Fix expand button styling #3544

Merged
merged 1 commit into from Apr 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/devtools/Explorer.tsx
Expand Up @@ -19,6 +19,16 @@ export const LabelButton = styled('button', {
color: 'white',
})

export const ExpandButton = styled('button', {
cursor: 'pointer',
color: 'inherit',
font: 'inherit',
outline: 'inherit',
background: 'transparent',
border: 'none',
padding: 0,
})

export const Value = styled('span', (_props, theme) => ({
color: theme.danger,
}))
Expand Down Expand Up @@ -107,13 +117,13 @@ export const DefaultRenderer: Renderer = ({
<Entry key={label}>
{subEntryPages?.length ? (
<>
<button onClick={() => toggleExpanded()}>
<ExpandButton onClick={() => toggleExpanded()}>
<Expander expanded={expanded} /> {label}{' '}
<Info>
{String(type).toLowerCase() === 'iterable' ? '(Iterable) ' : ''}
{subEntries.length} {subEntries.length > 1 ? `items` : `item`}
</Info>
</button>
</ExpandButton>
{expanded ? (
subEntryPages.length === 1 ? (
<SubEntries>
Expand Down