Sidebar.tsx 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import React from 'react';
  2. import { useTranslation } from 'react-i18next';
  3. // import Button from '../components/Button';
  4. import Typography from '../components/Typography';
  5. // import Icon from '../components/Icon';
  6. // import CreateForm from './CreateForm';
  7. import MarkupTools from './MarkupTools';
  8. // import useActions from '../actions';
  9. import useStore from '../store';
  10. // import { BtnWrapper } from '../global/toolStyled';
  11. import { SidebarWrapper } from '../global/otherStyled';
  12. const Sidebar: React.FC = () => {
  13. const { t } = useTranslation('sidebar');
  14. const [{ displayMode }] = useStore();
  15. // const { setSidebar } = useActions(dispatch);
  16. // const onClick = (state: string): void => {
  17. // if (state === sidebarState) {
  18. // setSidebar('');
  19. // } else {
  20. // setSidebar(state);
  21. // }
  22. // };
  23. return (
  24. <SidebarWrapper isHidden={displayMode === 'full'}>
  25. <Typography
  26. light
  27. style={{ marginLeft: '30px', marginTop: '46px' }}
  28. align="left"
  29. >
  30. {t('mainMenu')}
  31. </Typography>
  32. <MarkupTools />
  33. {/* <CreateForm /> */}
  34. {/* <BtnWrapper>
  35. <Button shouldFitContainer align="left" onClick={(): void => { onClick('add-image'); }}>
  36. <Icon glyph="add-image" style={{ marginRight: '10px' }} />
  37. {t('addImages')}
  38. </Button>
  39. </BtnWrapper> */}
  40. </SidebarWrapper>
  41. );
  42. };
  43. export default Sidebar;