feat: new extensions hook PropertyDetailsCell + wrap property name into span

This commit is contained in:
romanhotsiy 2020-10-16 17:41:35 +03:00
parent d4016b8142
commit 0fae030996
No known key found for this signature in database
GPG Key ID: 0BC2221278CCBBB8
2 changed files with 4 additions and 2 deletions

View File

@ -98,6 +98,8 @@ export const PropertyDetailsCell = styled.td`
border-left: none; border-left: none;
} }
`} `}
${extensionsHook('PropertyDetailsCell')};
`; `;
export const PropertyBullet = styled.span` export const PropertyBullet = styled.span`

View File

@ -64,7 +64,7 @@ export class Field extends React.Component<FieldProps> {
onKeyPress={this.handleKeyPress} onKeyPress={this.handleKeyPress}
aria-label="expand properties" aria-label="expand properties"
> >
{name} <span>{name}</span>
<ShelfIcon direction={expanded ? 'down' : 'right'} /> <ShelfIcon direction={expanded ? 'down' : 'right'} />
</button> </button>
{required && <RequiredLabel> required </RequiredLabel>} {required && <RequiredLabel> required </RequiredLabel>}
@ -72,7 +72,7 @@ export class Field extends React.Component<FieldProps> {
) : ( ) : (
<PropertyNameCell className={deprecated ? 'deprecated' : undefined} kind={kind} title={name}> <PropertyNameCell className={deprecated ? 'deprecated' : undefined} kind={kind} title={name}>
<PropertyBullet /> <PropertyBullet />
{name} <span>{name}</span>
{required && <RequiredLabel> required </RequiredLabel>} {required && <RequiredLabel> required </RequiredLabel>}
</PropertyNameCell> </PropertyNameCell>
); );