Merge branch 'development' into launchKitLanding
* development: (110 commits) fix: fix exceeds block gas limit error chore(instant): fix lint error fix: remove unused vars Send in affiliate info as option Have heartbeat update not trigger errors fix: remove redundant handler feat: make onUnlockWalletClick different based on ON chore: remove wallet panel content for mobile feat: use blue for wallet prompt on mobile feat: use stable version of bowser fix: add http to external url string feat: make onUnlockWalletClick different based on ON chore: remove wallet panel content for mobile feat: use blue for wallet prompt on mobile feat: use stable version of bowser feat: expose webpack-dev-server content to local network fix(website): remove node env definition from webpack fix(website): currentProvider called on undefined chore: update yarn lock feat: use capital values for enums ...
This commit is contained in:
@@ -1,17 +1,34 @@
|
||||
import { Link } from '@0x/react-shared';
|
||||
import * as React from 'react';
|
||||
import { styled } from 'ts/style/theme';
|
||||
import { WebsitePaths } from 'ts/types';
|
||||
|
||||
import { Container } from '../ui/container';
|
||||
|
||||
export interface DocsLogoProps {
|
||||
height: number;
|
||||
containerStyle?: React.CSSProperties;
|
||||
}
|
||||
|
||||
const Image = styled.img`
|
||||
&:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
`;
|
||||
|
||||
export const DocsLogo: React.StatelessComponent<DocsLogoProps> = props => {
|
||||
return (
|
||||
<Link to={WebsitePaths.Docs}>
|
||||
<img src="/images/docs_logo.svg" height={props.height} />
|
||||
</Link>
|
||||
<Container className="flex">
|
||||
<Container>
|
||||
<Link to={WebsitePaths.Home}>
|
||||
<Image src="/images/developers/logo/0x.svg" height={34} />
|
||||
</Link>
|
||||
</Container>
|
||||
<Container paddingTop="6px" paddingLeft="7px">
|
||||
<Link to={WebsitePaths.Docs}>
|
||||
<Image src="/images/developers/logo/docs.svg" height={20} />
|
||||
</Link>
|
||||
</Container>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
|
||||
|
@@ -38,17 +38,17 @@ export class DocsTopBar extends React.Component<DocsTopBarProps, DocsTopBarState
|
||||
return (
|
||||
<Container height={80}>
|
||||
<Container
|
||||
className="flex items-center lg-pt3 md-pt3 sm-pt1 lg-mt1 md-mt1 sm-mt0 lg-justify-end md-justify-end sm-justify-start"
|
||||
className="flex items-center lg-pt3 md-pt3 sm-pt1 lg-justify-end md-justify-end sm-justify-start"
|
||||
width="100%"
|
||||
>
|
||||
<Container className="sm-hide xs-hide">
|
||||
<Container className="flex items-center justify-between right" width="300px">
|
||||
<Container className="flex items-center justify-between right" width="250px">
|
||||
{this._renderMenuItems(constants.DEVELOPER_TOPBAR_LINKS)}
|
||||
</Container>
|
||||
</Container>
|
||||
<Container className="lg-hide md-hide">
|
||||
<Container paddingTop="6px">
|
||||
<DocsLogo height={30} />
|
||||
<DocsLogo />
|
||||
</Container>
|
||||
</Container>
|
||||
<Container className="md-hide lg-hide absolute" right="18px" top="12px">
|
||||
@@ -63,7 +63,7 @@ export class DocsTopBar extends React.Component<DocsTopBarProps, DocsTopBarState
|
||||
/>
|
||||
</Container>
|
||||
</Container>
|
||||
<Container width={'100%'} height={'1px'} backgroundColor={colors.grey300} marginTop={'13px'} />
|
||||
<Container width={'100%'} height={'1px'} backgroundColor={colors.grey300} marginTop={'16px'} />
|
||||
{this.props.screenWidth === ScreenWidths.Sm && this._renderDrawer()}
|
||||
</Container>
|
||||
);
|
||||
|
@@ -29,6 +29,7 @@ export const SidebarHeader: React.StatelessComponent<SidebarHeaderProps> = ({
|
||||
fontColor={colors.lightLinkBlue}
|
||||
fontSize={screenWidth === ScreenWidths.Sm ? '20px' : '22px'}
|
||||
fontWeight="bold"
|
||||
lineHeight="26px"
|
||||
>
|
||||
{title}
|
||||
</Text>
|
||||
@@ -36,7 +37,7 @@ export const SidebarHeader: React.StatelessComponent<SidebarHeaderProps> = ({
|
||||
{!_.isUndefined(docsVersion) &&
|
||||
!_.isUndefined(availableDocVersions) &&
|
||||
!_.isUndefined(onVersionSelected) && (
|
||||
<div className="right" style={{ alignSelf: 'flex-end' }}>
|
||||
<div className="right" style={{ alignSelf: 'flex-end', paddingBottom: 4 }}>
|
||||
<VersionDropDown
|
||||
selectedVersion={docsVersion}
|
||||
versions={availableDocVersions}
|
||||
|
@@ -27,7 +27,7 @@ const PlainActiveNode: React.StatelessComponent<ActiveNodeProps> = ({ className,
|
||||
|
||||
const ActiveNode = styled(PlainActiveNode)`
|
||||
cursor: pointer;
|
||||
border: 2px solid ${colors.beigeWhite};
|
||||
border: 1px solid ${colors.beigeWhite};
|
||||
border-radius: 4px;
|
||||
padding: 4px 6px 4px 8px;
|
||||
`;
|
||||
|
@@ -89,7 +89,7 @@ export class DevelopersDropDown extends React.Component<DevelopersDropDownProps,
|
||||
);
|
||||
}
|
||||
private _renderDropdownMenu(): React.ReactNode {
|
||||
const sectionPadding = '28px';
|
||||
const sectionPadding = '26px';
|
||||
const dropdownMenu = (
|
||||
<Container>
|
||||
<Container className="flex" padding={sectionPadding}>
|
||||
|
@@ -4,11 +4,13 @@ import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { Button } from 'ts/components/ui/button';
|
||||
import { Text } from 'ts/components/ui/text';
|
||||
import { ScreenWidths } from 'ts/types';
|
||||
|
||||
export interface NestedSidebarMenuProps {
|
||||
sectionNameToLinks: ObjectMap<ALink[]>;
|
||||
sidebarHeader?: React.ReactNode;
|
||||
shouldReformatMenuItemNames?: boolean;
|
||||
screenWidth: ScreenWidths;
|
||||
}
|
||||
|
||||
export const NestedSidebarMenu = (props: NestedSidebarMenuProps) => {
|
||||
@@ -22,7 +24,7 @@ export const NestedSidebarMenu = (props: NestedSidebarMenuProps) => {
|
||||
...link,
|
||||
title: menuItemTitle,
|
||||
};
|
||||
return <MenuItem key={`menu-item-${menuItemTitle}`} link={finalLink} />;
|
||||
return <MenuItem key={`menu-item-${menuItemTitle}`} link={finalLink} screenWidth={props.screenWidth} />;
|
||||
});
|
||||
// tslint:disable-next-line:no-unused-variable
|
||||
return (
|
||||
@@ -44,6 +46,7 @@ export const NestedSidebarMenu = (props: NestedSidebarMenuProps) => {
|
||||
|
||||
export interface MenuItemProps {
|
||||
link: ALink;
|
||||
screenWidth: ScreenWidths;
|
||||
}
|
||||
|
||||
export interface MenuItemState {
|
||||
@@ -70,7 +73,13 @@ export class MenuItem extends React.Component<MenuItemProps, MenuItemState> {
|
||||
borderRadius="4px"
|
||||
padding="0.4em 0.375em"
|
||||
width="100%"
|
||||
backgroundColor={isActive ? colors.lightLinkBlue : colors.grey100}
|
||||
backgroundColor={
|
||||
isActive
|
||||
? colors.lightLinkBlue
|
||||
: this.props.screenWidth === ScreenWidths.Sm
|
||||
? 'white'
|
||||
: colors.grey100
|
||||
}
|
||||
fontSize="14px"
|
||||
textAlign="left"
|
||||
>
|
||||
|
Reference in New Issue
Block a user