import { colors } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { Link } from 'react-router-dom'; import { CallToAction } from 'ts/components/ui/button'; const DEFAULT_STYLE = { color: colors.darkestGrey, }; interface TopBarMenuItemProps { title: string; path?: string; isPrimary?: boolean; isExternal: boolean; style?: React.CSSProperties; className?: string; isNightVersion?: boolean; } interface TopBarMenuItemState {} export class TopBarMenuItem extends React.Component { public static defaultProps: Partial = { isPrimary: false, style: DEFAULT_STYLE, className: '', isNightVersion: false, }; public render(): React.ReactNode { const menuItemColor = this.props.isNightVersion ? 'white' : this.props.style.color; const linkColor = _.isUndefined(menuItemColor) ? colors.darkestGrey : menuItemColor; const itemContent = this.props.isPrimary ? ( {this.props.title} ) : ( this.props.title ); return (
{this.props.isExternal ? ( {itemContent} ) : ( {itemContent} )}
); } }