import { Fragment } from 'react' import classNames from 'classnames/bind' import Button from './button' import Icon from './icon' import Image from './image' import Text from './text' const cx = classNames.bind(_s) export default class ListItem extends PureComponent { static propTypes = { icon: PropTypes.string, image: PropTypes.string, isLast: PropTypes.bool, isHidden: PropTypes.bool, to: PropTypes.string, href: PropTypes.string, title: PropTypes.string, subtitle: PropTypes.string, isActive: PropTypes.bool, actionIcon: PropTypes.bool, onClick: PropTypes.func, size: PropTypes.oneOf([ 'small', 'large', ]), hideArrow: PropTypes.bool, } handleOnClick = (e) => { if (!!this.props.onClick) { this.props.onClick(e) } } render() { const { title, isLast, to, href, onClick, actionIcon, size, icon, image, hideArrow, isHidden, subtitle, isActive, } = this.props if (!title) { return (
) } if (isHidden) { return (