diff --git a/app/javascript/gabsocial/components/list_item.js b/app/javascript/gabsocial/components/list_item.js index 901672b5..ea8a3fbc 100644 --- a/app/javascript/gabsocial/components/list_item.js +++ b/app/javascript/gabsocial/components/list_item.js @@ -7,6 +7,7 @@ import Text from './text' const cx = classNames.bind(_s) export default class ListItem extends PureComponent { + static propTypes = { icon: PropTypes.string, isLast: PropTypes.bool, @@ -14,9 +15,12 @@ export default class ListItem extends PureComponent { to: PropTypes.string, href: PropTypes.string, title: PropTypes.string, + subtitle: PropTypes.string, + isActive: PropTypes.bool, onClick: PropTypes.func, size: PropTypes.oneOf([ - 'small', 'large' + 'small', + 'large', ]), hideArrow: PropTypes.bool, } @@ -32,8 +36,16 @@ export default class ListItem extends PureComponent { icon, hideArrow, isHidden, + subtitle, + isActive, } = this.props + if (!title) { + return ( +
+ ) + } + if (isHidden) { return (