diff options
author | Fabio Berger <me@fabioberger.com> | 2018-03-22 19:56:12 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-03-22 19:56:12 +0800 |
commit | 46b7fecafe283e814e2088373ec857747e4cf314 (patch) | |
tree | d9cbf5cf571231470b568ece2f051557e2b9e08b /packages/react-shared/src/components/section_header.tsx | |
parent | e1341bc6d957d70a386c858cbdb64af5f284fd07 (diff) | |
download | dexon-sol-tools-46b7fecafe283e814e2088373ec857747e4cf314.tar dexon-sol-tools-46b7fecafe283e814e2088373ec857747e4cf314.tar.gz dexon-sol-tools-46b7fecafe283e814e2088373ec857747e4cf314.tar.bz2 dexon-sol-tools-46b7fecafe283e814e2088373ec857747e4cf314.tar.lz dexon-sol-tools-46b7fecafe283e814e2088373ec857747e4cf314.tar.xz dexon-sol-tools-46b7fecafe283e814e2088373ec857747e4cf314.tar.zst dexon-sol-tools-46b7fecafe283e814e2088373ec857747e4cf314.zip |
Create helper function for converting dashes names for display
Diffstat (limited to 'packages/react-shared/src/components/section_header.tsx')
-rw-r--r-- | packages/react-shared/src/components/section_header.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/react-shared/src/components/section_header.tsx b/packages/react-shared/src/components/section_header.tsx index 2ef5f61ee..0224c2127 100644 --- a/packages/react-shared/src/components/section_header.tsx +++ b/packages/react-shared/src/components/section_header.tsx @@ -35,7 +35,7 @@ export class SectionHeader extends React.Component<SectionHeaderProps, SectionHe public render() { const { sectionName, headerSize } = this.props as PropsWithDefaults; - const finalSectionName = this.props.sectionName.replace(/-/g, ' '); + const finalSectionName = utils.convertDashesToSpaces(this.props.sectionName); const id = utils.getIdFromName(finalSectionName); return ( <div |