UNPKG

e-lado

Version:

[![CircleCI](https://circleci.com/gh/sharetribe/sharetribe/tree/master.svg?style=svg)](https://circleci.com/gh/sharetribe/sharetribe/tree/master) [![Dependency Status](https://gemnasium.com/sharetribe/sharetribe.png)](https://gemnasium.com/sharetribe/shar

38 lines (33 loc) 986 B
import { Component, PropTypes } from 'react'; import { div, span } from 'r-dom'; import css from './MenuMobile.css'; import hamburgerIcon from './images/hamburgerIcon.svg'; class MenuLabelMobile extends Component { render() { const extraClasses = this.props.extraClasses ? this.props.extraClasses : ''; return ( div({ className: `MenuLabelMobile ${css.menuLabelMobile} ${extraClasses}`, onClick: this.props.handleClick, }, [ span({ className: css.menuLabelMobileIcon, title: this.props.name, dangerouslySetInnerHTML: { __html: hamburgerIcon, }, }), ].concat(this.props.children)) ); } } MenuLabelMobile.propTypes = { name: PropTypes.string.isRequired, handleClick: PropTypes.func.isRequired, extraClasses: PropTypes.string, children: PropTypes.oneOfType([ PropTypes.arrayOf(PropTypes.node), PropTypes.node, ]), }; export default MenuLabelMobile;