import Radium from 'radium'
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import { Box, Icon } from '.'
import { sizeInfo, colorInfo, fontInfo } from './style'
import downArrowImage from './images/down-arrow.svg'
import upArrowImage from './images/up-arrow.svg'
import autobind from 'autobind-decorator'
@Radium
export class DropdownList extends Component {
static propTypes = {
data: PropTypes.array,
render: PropTypes.func.isRequired,
}
constructor(props) {
super(props)
this.state = {
open: false,
}
}
@autobind
handleClick(e) {
this.setState({ open: !this.state.open })
}
render() {
const { data, render } = this.props
const { open } = this.state
const dropDownIconSize = 20
const dropdownIconMargin = 8
const dropdownBackground = 'white'
const selectedItem = data ? data[0] :
const border = { width: sizeInfo.listBorderWidth, color: colorInfo.listBorder }
let dropdown = null
if (open) {
dropdown = (