From 72e68c43e33cac1bd8a95c4b55ea745095cffa48 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 19 Dec 2018 15:58:05 -0800 Subject: remove unused file --- packages/website/ts/components/ui/select.tsx | 170 --------------------------- 1 file changed, 170 deletions(-) delete mode 100644 packages/website/ts/components/ui/select.tsx diff --git a/packages/website/ts/components/ui/select.tsx b/packages/website/ts/components/ui/select.tsx deleted file mode 100644 index e4fb50f59..000000000 --- a/packages/website/ts/components/ui/select.tsx +++ /dev/null @@ -1,170 +0,0 @@ -import { colors } from '@0x/react-shared'; -import * as _ from 'lodash'; -import * as React from 'react'; - -import { zIndex } from 'ts/style/z_index'; - -import { Container } from './container'; -import { Overlay } from './overlay'; -import { Text } from './text'; - -export interface SelectItemConfig { - text: string; - onClick?: () => void; -} - -export interface SelectProps { - value: string; - label?: string; - items: SelectItemConfig[]; - onOpen?: () => void; - border?: string; - fontSize?: string; - iconSize?: number; - textColor?: string; - labelColor?: string; - backgroundColor?: string; -} - -export interface SelectState { - isOpen: boolean; -} - -export class Select extends React.Component { - public static defaultProps = { - items: [] as SelectItemConfig[], - textColor: colors.black, - backgroundColor: colors.white, - fontSize: '16px', - iconSize: 25, - }; - public state: SelectState = { - isOpen: false, - }; - public render(): React.ReactNode { - const { value, label, items, border, textColor, labelColor, backgroundColor, fontSize, iconSize } = this.props; - const { isOpen } = this.state; - const hasItems = !_.isEmpty(items); - const borderRadius = isOpen ? '4px 4px 0px 0px' : '4px'; - return ( - - {isOpen && ( - - )} - - - - - {value} - - - {label && ( - - {label} - - )} - {hasItems && ( - - - - )} - - - - {isOpen && ( - - {_.map(items, (item, index) => ( - - ))} - - )} - - - ); - } - private readonly _handleDropdownClick = (): void => { - if (_.isEmpty(this.props.items)) { - return; - } - const isOpen = !this.state.isOpen; - this.setState({ - isOpen, - }); - - if (isOpen && this.props.onOpen) { - this.props.onOpen(); - } - }; - private readonly _closeDropdown = (): void => { - this.setState({ - isOpen: false, - }); - }; -} - -export interface SelectItemProps extends SelectItemConfig { - text: string; - onClick?: () => void; - isLast: boolean; - backgroundColor?: string; - border?: string; - textColor?: string; - fontSize?: string; -} - -export const SelectItem: React.StatelessComponent = ({ - text, - onClick, - isLast, - border, - backgroundColor, - textColor, - fontSize, -}) => ( - - - {text} - - -); -- cgit v1.2.3