Skip to content

Commit

Permalink
Improve demo
Browse files Browse the repository at this point in the history
  • Loading branch information
hbjORbj committed Mar 31, 2022
1 parent 03c1201 commit f808c59
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions docs/pages/experiments/joy/chip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ export default function JoyChip() {
key={`${value}-without-decorator`}
sx={{ display: 'flex', flexDirection: 'column', alignItems: 'center' }}
>
<Chip label={`${propName}: ${value}`} {...{ [propName]: value }} />
{value && (
<Chip {...{ [propName]: value }}>{`${propName}: ${value}`}</Chip>
{value !== undefined && (
<Typography level="body3" sx={{ textAlign: 'center', mt: '4px' }}>
{value}
{`${value}`}
</Typography>
)}
</Box>
Expand All @@ -89,12 +89,11 @@ export default function JoyChip() {
<Chip
startDecorator={<ThumbUp />}
endDecorator={<ArrowDropDown />}
label={`${propName}: ${value}`}
{...{ [propName]: value }}
/>
{value && (
>{`${propName}: ${value}`}</Chip>
{value !== undefined && (
<Typography level="body3" sx={{ textAlign: 'center', mt: '4px' }}>
{value}
{`${value}`}
</Typography>
)}
</Box>
Expand Down

0 comments on commit f808c59

Please sign in to comment.