Browse Source

Hide empty cells in prop table

Remove awkward space when no default value is specified in the prop definition.
tags/0.3.0
TheoryOfNekomata 3 years ago
parent
commit
c4413725cc
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      packages/react-common-docs/src/components/Props/Props.tsx

+ 8
- 3
packages/react-common-docs/src/components/Props/Props.tsx View File

@@ -313,9 +313,14 @@ const Props: React.FC<Props> = ({ of: ofAttr }) => {
<BodyCell <BodyCell
data-column-name={propDefaultValue ? 'Default' : undefined} data-column-name={propDefaultValue ? 'Default' : undefined}
> >
<Code>
{getPropTypeHtml(propDefaultValue)}
</Code>
{
propDefaultValue
&& (
<Code>
{getPropTypeHtml(propDefaultValue)}
</Code>
)
}
</BodyCell> </BodyCell>
<BodyCell> <BodyCell>
{prop.description} {prop.description}


Loading…
Cancel
Save