fix(react): bolding field name if single token (#3080)

This commit is contained in:
Gabe Lyons 2021-08-11 17:14:08 -07:00 committed by GitHub
parent bd1b90d312
commit a5bd0c5c3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,10 @@ export default function schemaTitleRenderer(fieldPath: string) {
}
}
if (!lastPath) {
return <Typography.Text strong>{firstPath}</Typography.Text>;
}
return (
<span>
<LighterText>{`${firstPath}${lastPath ? '.' : ''}`}</LighterText>