file-tree-folder-icons.tsx 640 B

1234567891011121314151617181920212223
  1. import { useTranslation } from 'react-i18next'
  2. import MaterialIcon from '@/shared/components/material-icon'
  3. function FileTreeFolderIcons({ expanded }: { expanded: boolean }) {
  4. const { t } = useTranslation()
  5. return (
  6. <>
  7. <div
  8. // TODO ide-redesign-cleanup: rename the class now its no longer a button
  9. className="folder-expand-collapse-button"
  10. aria-label={expanded ? t('collapse') : t('expand')}
  11. >
  12. <MaterialIcon
  13. type={expanded ? 'expand_more' : 'chevron_right'}
  14. className="file-tree-expand-icon"
  15. />
  16. </div>
  17. </>
  18. )
  19. }
  20. export default FileTreeFolderIcons