diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-05-16 07:18:49 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-05-19 02:35:13 +0800 |
commit | 317ff817445c20a64b5978dae1210a515c248f4f (patch) | |
tree | 0b7e8fd4793ee12fc8bc352b416d1575e5328d56 /packages/website/ts/components/top_bar/top_bar.tsx | |
parent | bd7fc780cb8003a0b110615ff3c357ca9a426bd0 (diff) | |
download | dexon-0x-contracts-317ff817445c20a64b5978dae1210a515c248f4f.tar dexon-0x-contracts-317ff817445c20a64b5978dae1210a515c248f4f.tar.gz dexon-0x-contracts-317ff817445c20a64b5978dae1210a515c248f4f.tar.bz2 dexon-0x-contracts-317ff817445c20a64b5978dae1210a515c248f4f.tar.lz dexon-0x-contracts-317ff817445c20a64b5978dae1210a515c248f4f.tar.xz dexon-0x-contracts-317ff817445c20a64b5978dae1210a515c248f4f.tar.zst dexon-0x-contracts-317ff817445c20a64b5978dae1210a515c248f4f.zip |
Set up scaffolding for new drawer
Diffstat (limited to 'packages/website/ts/components/top_bar/top_bar.tsx')
-rw-r--r-- | packages/website/ts/components/top_bar/top_bar.tsx | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index 5fde007d6..7d5d05c9f 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -18,6 +18,7 @@ import { Dispatcher } from 'ts/redux/dispatcher'; import { Deco, Key, ProviderType, WebsiteLegacyPaths, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; +import { utils } from 'ts/utils/utils'; export enum TopBarDisplayType { Default, @@ -202,6 +203,8 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> { </div> ); const popoverContent = <Menu style={{ color: colors.darkGrey }}>{developerSectionMenuItems}</Menu>; + // TODO : Remove this once we ship portal v2 + const shouldShowPortalV2Drawer = this._isViewingPortal() && utils.shouldShowPortalV2(); return ( <div style={{ ...styles.topBar, ...bottomBorderStyle, ...this.props.style, ...{ height } }} className="pb1"> <div className={parentClassNames}> @@ -274,10 +277,22 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> { </div> </div> </div> - {this._renderDrawer()} + {shouldShowPortalV2Drawer ? this._renderPortalV2Drawer() : this._renderDrawer()} </div> ); } + private _renderPortalV2Drawer(): React.ReactNode { + return ( + <Drawer + open={this.state.isDrawerOpen} + docked={false} + openSecondary={true} + onRequestChange={this._onMenuButtonClick.bind(this)} + > + <div /> + </Drawer> + ); + } private _renderDrawer(): React.ReactNode { return ( <Drawer |