diff options
author | Fabio Berger <me@fabioberger.com> | 2018-04-18 16:55:16 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-04-18 16:55:16 +0800 |
commit | 4ea222bbffd7a378712320a2f366d5bbee5920af (patch) | |
tree | ad6926428b13a2a11328389a2f3dee70fcd9dfe8 /packages/react-docs | |
parent | f9f5e04b414aef589d314ab01cf1f042925c0756 (diff) | |
download | dexon-0x-contracts-4ea222bbffd7a378712320a2f366d5bbee5920af.tar dexon-0x-contracts-4ea222bbffd7a378712320a2f366d5bbee5920af.tar.gz dexon-0x-contracts-4ea222bbffd7a378712320a2f366d5bbee5920af.tar.bz2 dexon-0x-contracts-4ea222bbffd7a378712320a2f366d5bbee5920af.tar.lz dexon-0x-contracts-4ea222bbffd7a378712320a2f366d5bbee5920af.tar.xz dexon-0x-contracts-4ea222bbffd7a378712320a2f366d5bbee5920af.tar.zst dexon-0x-contracts-4ea222bbffd7a378712320a2f366d5bbee5920af.zip |
Bold property names
Diffstat (limited to 'packages/react-docs')
-rw-r--r-- | packages/react-docs/src/components/type_definition.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/react-docs/src/components/type_definition.tsx b/packages/react-docs/src/components/type_definition.tsx index 6d24145a1..605b58fbd 100644 --- a/packages/react-docs/src/components/type_definition.tsx +++ b/packages/react-docs/src/components/type_definition.tsx @@ -159,12 +159,15 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef } const segments = sanitizedText.split(PROPERTY_DESCRIPTION_DIVIDER); _.each(segments, (s: string, i: number) => { - if (i === 0 || i === segments.length - 1) { + if (i === 0) { + segments[i] = `**${s}**`; + return; + } else if (i === segments.length - 1) { return; } const words = s.split(' '); const property = words[words.length - 1]; - words[words.length - 1] = `\n\n${property}`; + words[words.length - 1] = `\n\n**${property}**`; segments[i] = words.join(' '); }); const final = segments.join(PROPERTY_DESCRIPTION_DIVIDER); |