From 18c31a3bc045d9e3ccc1e17573f879c2d49cecfe Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 17 Oct 2018 00:37:56 +0100 Subject: chore: Add topBar menu items to mobile drawer --- .../ts/components/documentation/docs_top_bar.tsx | 26 +++------------------- packages/website/ts/components/ui/button.tsx | 3 +++ 2 files changed, 6 insertions(+), 23 deletions(-) (limited to 'packages/website/ts/components') diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index d6e0c124d..9a9b9a616 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -5,7 +5,7 @@ import * as React from 'react'; import { DocsLogo } from 'ts/components/documentation/docs_logo'; import { Container } from 'ts/components/ui/container'; import { Text } from 'ts/components/ui/text'; -import { Deco, Key, ScreenWidths, WebsitePaths } from 'ts/types'; +import { Deco, Key, ScreenWidths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; @@ -35,26 +35,6 @@ export class DocsTopBar extends React.Component - {this._renderMenuItems(menuItemLinks)} + {this._renderMenuItems(constants.DEVELOPER_TOPBAR_LINKS)} @@ -98,7 +78,7 @@ export class DocsTopBar extends React.Component - {menuItemInfo.title} + {this.props.translate.get(menuItemInfo.title as Key, Deco.Cap)} diff --git a/packages/website/ts/components/ui/button.tsx b/packages/website/ts/components/ui/button.tsx index ccaadc800..2a6a1f477 100644 --- a/packages/website/ts/components/ui/button.tsx +++ b/packages/website/ts/components/ui/button.tsx @@ -16,6 +16,7 @@ export interface ButtonProps { type?: string; isDisabled?: boolean; onClick?: (event: React.MouseEvent) => void; + textAlign?: string; } const PlainButton: React.StatelessComponent = ({ children, isDisabled, onClick, type, className }) => ( @@ -35,6 +36,7 @@ export const Button = styled(PlainButton)` outline: none; font-family: ${props => props.fontFamily}; width: ${props => props.width}; + text-align: ${props => props.textAlign}; background-color: ${props => props.backgroundColor}; border: ${props => (props.borderColor ? `1px solid ${props.borderColor}` : 'none')}; &:hover { @@ -59,6 +61,7 @@ Button.defaultProps = { fontFamily: 'Roboto', isDisabled: false, padding: '0.8em 2.2em', + textAlign: 'center', }; Button.displayName = 'Button'; -- cgit v1.2.3