import { colors } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { Button } from 'ts/components/ui/button'; import { Container } from 'ts/components/ui/container'; import { DropDown, DropdownMouseEvent } from 'ts/components/ui/drop_down'; import { Text } from 'ts/components/ui/text'; import { styled } from 'ts/style/theme'; interface ActiveNodeProps { className?: string; selectedVersion: string; } const PlainActiveNode: React.StatelessComponent = ({ className, selectedVersion }) => ( v {selectedVersion} ); const ActiveNode = styled(PlainActiveNode)` cursor: pointer; border: 2px solid ${colors.beigeWhite}; border-radius: 4px; padding: 4px 6px 4px 8px; `; interface VersionDropDownProps { selectedVersion: string; versions: string[]; onVersionSelected: (semver: string) => void; } interface VersionDropDownState {} export class VersionDropDown extends React.Component { public render(): React.ReactNode { const activeNode = ; return ( ); } private _renderDropdownMenu(): React.ReactNode { const items = _.map(this.props.versions, version => { const isSelected = version === this.props.selectedVersion; return ( ); }); const dropdownMenu = {items}; return dropdownMenu; } private _onClick(selectedVersion: string): void { this.props.onVersionSelected(selectedVersion); } }