import Radium from 'radium' import PropTypes from 'prop-types' import React, { Component } from 'react' import { Box, Icon } from '.' import { sizeInfo, colorInfo, fontInfo } from './style' class List extends Component { static propTypes = { children: PropTypes.node } render() { const { children } = this.props return (
{children}
) } } List.Item = Radium(class ListItem extends Component { static propTypes = { children: PropTypes.node, active: PropTypes.bool, onClick: PropTypes.func } render() { const { children, active, onClick } = this.props return (
{children}
) } }) List.Icon = Radium(class ListIcon extends Component { static propTypes = { name: PropTypes.string, size: PropTypes.number, } render() { const { size, name } = this.props let source = Icon.svgs[name] || Icon.svgs['placeholder'] return ( ) } }) List.Text = Radium(class ListText extends Component { static propTypes = { children: PropTypes.node, } render() { const { children } = this.props return ( {children} ) } }) export default Radium(List)