diff options
author | Fabio Berger <me@fabioberger.com> | 2018-03-20 20:26:04 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-03-20 20:26:04 +0800 |
commit | 72671c10148d304fec072d0c62bcc9788b967f55 (patch) | |
tree | f61a51be3f70aec87184f750361f44d1aea6a8dc /packages/website/ts/components/sidebar_header.tsx | |
parent | a3c31f4f4a4c1c6a79f3915753a5197988253f28 (diff) | |
download | dexon-0x-contracts-72671c10148d304fec072d0c62bcc9788b967f55.tar dexon-0x-contracts-72671c10148d304fec072d0c62bcc9788b967f55.tar.gz dexon-0x-contracts-72671c10148d304fec072d0c62bcc9788b967f55.tar.bz2 dexon-0x-contracts-72671c10148d304fec072d0c62bcc9788b967f55.tar.lz dexon-0x-contracts-72671c10148d304fec072d0c62bcc9788b967f55.tar.xz dexon-0x-contracts-72671c10148d304fec072d0c62bcc9788b967f55.tar.zst dexon-0x-contracts-72671c10148d304fec072d0c62bcc9788b967f55.zip |
Refactor titleToIcon mapping to idToIcon and move to docPage
Diffstat (limited to 'packages/website/ts/components/sidebar_header.tsx')
-rw-r--r-- | packages/website/ts/components/sidebar_header.tsx | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/packages/website/ts/components/sidebar_header.tsx b/packages/website/ts/components/sidebar_header.tsx index 556243430..51e8a59d5 100644 --- a/packages/website/ts/components/sidebar_header.tsx +++ b/packages/website/ts/components/sidebar_header.tsx @@ -4,20 +4,9 @@ import * as React from 'react'; const SHOW_DURATION_MS = 4000; -const titleToIcon: { [title: string]: string } = { - '0x.js': 'zeroExJs.png', - Web3Wrapper: 'zeroExJs.png', - Deployer: 'zeroExJs.png', - 'Sol-cov': 'zeroExJs.png', - 'JSON Schemas': 'zeroExJs.png', - Subproviders: 'zeroExJs.png', - '0x Connect': 'connect.png', - '0x Smart Contracts': 'contracts.png', - Wiki: 'wiki.png', -}; - interface SidebarHeaderProps { title: string; + iconUrl: string; } interface SidebarHeaderState {} @@ -37,7 +26,7 @@ export class SidebarHeader extends React.Component<SidebarHeaderProps, SidebarHe </div> <div className="flex"> <div> - <img src={`/images/doc_icons/${titleToIcon[this.props.title]}`} width="22" /> + <img src={`/images/doc_icons/${this.props.iconUrl}`} width="22" /> </div> <div className="pl1" style={{ fontWeight: 600, fontSize: 20, lineHeight: 1.2 }}> {this.props.title} |