import React from 'react' import Radium from 'radium' import Immutable from 'immutable' import color from 'color' import Heading from 'rebass/dist/Heading' import Toolbar from 'rebass/dist/Toolbar' import NavItem from 'rebass/dist/NavItem' import Space from 'rebass/dist/Space' import { LayerEditor } from './editor.jsx' import scrollbars from '../scrollbars.scss' import PureRenderMixin from 'react-addons-pure-render-mixin'; import theme from '../theme.js' @Radium class LayerListItem extends React.Component { static propTypes = { layerId: React.PropTypes.number.isRequired, onLayerSelected: React.PropTypes.func.isRequired, } constructor(props) { super(props) this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this); } render() { return
this.props.onLayerSelected(this.props.layerId)} style={{ backgroundColor: theme.colors.gray, ":hover": { backgroundColor: color(theme.colors.gray).lighten(0.15).hexString(), } }} > #{this.props.layerId}
} } export default Radium(LayerListItem);