share-project-button.jsx 857 B

123456789101112131415161718192021222324252627
  1. import PropTypes from 'prop-types'
  2. import { useTranslation } from 'react-i18next'
  3. import Icon from '../../../shared/components/icon'
  4. import MaterialIcon from '@/shared/components/material-icon'
  5. import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
  6. function ShareProjectButton({ onClick }) {
  7. const { t } = useTranslation()
  8. return (
  9. <div className="toolbar-item">
  10. <button type="button" className="btn btn-full-height" onClick={onClick}>
  11. <BootstrapVersionSwitcher
  12. bs3={<Icon type="group" fw />}
  13. bs5={<MaterialIcon type="group_add" className="align-middle" />}
  14. />
  15. <p className="toolbar-label">{t('share')}</p>
  16. </button>
  17. </div>
  18. )
  19. }
  20. ShareProjectButton.propTypes = {
  21. onClick: PropTypes.func.isRequired,
  22. }
  23. export default ShareProjectButton