import React from 'react' import classnames from 'classnames' import { translate } from 'react-i18next' import PropTypes from 'prop-types' import AnimateHeight from 'react-animate-height' const pad = number => { number = number.toString() return number.length < 2 ? pad('0' + number, 2) : number } const WorkspaceListItem = props => { return (
  • {pad(props.number)}
    {props.name}
    • props.onClickAllContent(props.idWs)} >
      Tous les contenus
      {/*
      Documents Archivés
      Documents Supprimés
      */}
    • Tableau de bord
    • { Object.keys(props.app).map(a =>
    • props.onClickContentFilter(props.idWs, a)} key={a} >
    • )}
    • Calendrier
  • ) } export default translate()(WorkspaceListItem) WorkspaceListItem.propTypes = { number: PropTypes.number.isRequired, name: PropTypes.string.isRequired, app: PropTypes.object, onClickTitle: PropTypes.func, onClickAllContent: PropTypes.func, isOpenInSidebar: PropTypes.bool } WorkspaceListItem.defaultProps = { onClickTitle: () => {}, onClickAllContent: () => {}, isOpenInSidebar: false }