import React from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' import BtnExtandedAction from './BtnExtandedAction.jsx' const ContentItem = props => { if (props.contentType === null) return null // this means the endpoint system/content_type hasn't responded yet const status = props.contentType.availableStatuses.find(s => s.slug === props.statusSlug) return (
{ props.label }
{props.idRoleUserWorkspace >= 2 &&
}
{status.label}
) } export default ContentItem ContentItem.propTypes = { type: PropTypes.string.isRequired, statusSlug: PropTypes.string.isRequired, customClass: PropTypes.string, label: PropTypes.string, contentType: PropTypes.object, onClickItem: PropTypes.func, faIcon: PropTypes.string } ContentItem.defaultProps = { label: '', customClass: '', onClickItem: () => {} }