diff options
author | Fabio Berger <me@fabioberger.com> | 2018-10-03 03:10:59 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-10-03 03:10:59 +0800 |
commit | c07412a992284b2f3045be1c620ea2e0a351139a (patch) | |
tree | 5d1baea6ae5c1bb70b4bf61a28bd131026098f8f /packages/website/ts/components/documentation | |
parent | 0c996803969e7ff3f62c023651f64468b3f76bd3 (diff) | |
download | dexon-sol-tools-c07412a992284b2f3045be1c620ea2e0a351139a.tar.gz dexon-sol-tools-c07412a992284b2f3045be1c620ea2e0a351139a.tar.zst dexon-sol-tools-c07412a992284b2f3045be1c620ea2e0a351139a.zip |
Use new Link UI component everywhere, and add complementary ALink type
Diffstat (limited to 'packages/website/ts/components/documentation')
3 files changed, 9 insertions, 9 deletions
diff --git a/packages/website/ts/components/documentation/docs_content_top_bar.tsx b/packages/website/ts/components/documentation/docs_content_top_bar.tsx index b5f51e1aa..7edb51587 100644 --- a/packages/website/ts/components/documentation/docs_content_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_content_top_bar.tsx @@ -1,19 +1,19 @@ -import { DocsMenu } from '@0xproject/react-docs'; import { colors, NestedSidebarMenu } from '@0xproject/react-shared'; +import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; import * as React from 'react'; import { DocsLogo } from 'ts/components/documentation/docs_logo'; import { Container } from 'ts/components/ui/container'; import { Link } from 'ts/components/ui/link'; -import { Deco, Key, WebsitePaths } from 'ts/types'; +import { ALink, Deco, Key, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; export interface DocsContentTopBarProps { location: Location; translate: Translate; - menu?: DocsMenu; + sectionNameToLinks?: ObjectMap<ALink[]>; } interface DocsContentTopBarState { @@ -146,12 +146,13 @@ export class DocsContentTopBar extends React.Component<DocsContentTopBarProps, D onRequestChange={this._onMenuButtonClick.bind(this)} > <div className="clearfix pl1"> - <NestedSidebarMenu + TODO + {/* <NestedSidebarMenu topLevelMenu={this.props.menu} shouldDisplaySectionHeaders={true} shouldReformatMenuItemNames={false} onMenuItemClick={this._onMenuButtonClick.bind(this)} - /> + /> */} </div> </Drawer> ); diff --git a/packages/website/ts/components/documentation/docs_logo.tsx b/packages/website/ts/components/documentation/docs_logo.tsx index 570a81bca..9bd742749 100644 --- a/packages/website/ts/components/documentation/docs_logo.tsx +++ b/packages/website/ts/components/documentation/docs_logo.tsx @@ -10,7 +10,7 @@ export interface DocsLogoProps { export const DocsLogo: React.StatelessComponent<DocsLogoProps> = props => { return ( <div style={props.containerStyle}> - <Link to={`${WebsitePaths.Docs}`} className="text-decoration-none"> + <Link to={WebsitePaths.Docs}> <img src="/images/docs_logo.svg" height={props.height} /> </Link> </div> diff --git a/packages/website/ts/components/documentation/tutorial_button.tsx b/packages/website/ts/components/documentation/tutorial_button.tsx index 094bc3d92..7ed9c6e4e 100644 --- a/packages/website/ts/components/documentation/tutorial_button.tsx +++ b/packages/website/ts/components/documentation/tutorial_button.tsx @@ -25,8 +25,7 @@ export class TutorialButton extends React.Component<TutorialButtonProps, Tutoria public render(): React.ReactNode { return ( <Link - to={this.props.tutorialInfo.location} - className="text-decoration-none" + to={this.props.tutorialInfo.link.to} onMouseEnter={this._onHover.bind(this)} onMouseOver={this._onHover.bind(this)} onMouseLeave={this._onHoverOff.bind(this)} @@ -46,7 +45,7 @@ export class TutorialButton extends React.Component<TutorialButtonProps, Tutoria </div> <div className="lg-pl2 md-pl2 sm-pl3 col col-10"> <Text Tag="div" fontSize="18" fontColor={colors.lightLinkBlue} fontWeight="bold"> - {this.props.translate.get(this.props.tutorialInfo.title as Key, Deco.Cap)} + {this.props.translate.get(this.props.tutorialInfo.link.title as Key, Deco.Cap)} </Text> <Text Tag="div" fontColor={colors.grey750} fontSize="16"> {this.props.translate.get(this.props.tutorialInfo.description as Key, Deco.Cap)} |