aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-04-18 16:55:16 +0800
committerFabio Berger <me@fabioberger.com>2018-04-18 16:55:16 +0800
commit4ea222bbffd7a378712320a2f366d5bbee5920af (patch)
treead6926428b13a2a11328389a2f3dee70fcd9dfe8 /packages/react-docs
parentf9f5e04b414aef589d314ab01cf1f042925c0756 (diff)
downloaddexon-sol-tools-4ea222bbffd7a378712320a2f366d5bbee5920af.tar.gz
dexon-sol-tools-4ea222bbffd7a378712320a2f366d5bbee5920af.tar.zst
dexon-sol-tools-4ea222bbffd7a378712320a2f366d5bbee5920af.zip
Bold property names
Diffstat (limited to 'packages/react-docs')
-rw-r--r--packages/react-docs/src/components/type_definition.tsx7
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);