index.tsx 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import React from 'react';
  2. import Icon from '../Icon';
  3. import Button from '../Button';
  4. import ExpansionPanel from '../ExpansionPanel';
  5. import Typography from '../Typography';
  6. import SelectBox from '../SelectBox';
  7. import ColorSelect from '../ColorSelect';
  8. import Sliders from '../Sliders';
  9. import { Group, Item, SliderWrapper } from '../../global/toolStyled';
  10. const BrushOptions = [
  11. {
  12. key: 'freehand',
  13. content: <Icon glyph="freehand" />,
  14. value: '',
  15. },
  16. {
  17. key: 'markpen',
  18. content: <Icon glyph="markpen" />,
  19. value: '',
  20. },
  21. ];
  22. const Freehand = () => {
  23. return (
  24. <ExpansionPanel
  25. label={
  26. <Button shouldFitContainer align="left">
  27. <Icon glyph="freehand" style={{marginRight: '10px'}} />
  28. Freehand
  29. </Button>
  30. }
  31. >
  32. <Typography variant="subtitle" style={{marginTop: '4px'}}>Tools</Typography>
  33. <Group>
  34. <SelectBox options={BrushOptions} />
  35. <Item size="small">
  36. <Icon glyph="eraser" />
  37. </Item>
  38. <Item size="small">
  39. <Icon glyph="redo" />
  40. </Item>
  41. <Item size="small">
  42. <Icon glyph="undo" />
  43. </Item>
  44. </Group>
  45. <ColorSelect />
  46. <Typography variant="subtitle" style={{marginTop: '4px'}}>Opacity</Typography>
  47. <Group>
  48. <SliderWrapper>
  49. <Sliders />
  50. </SliderWrapper>
  51. 40%
  52. </Group>
  53. <Typography variant="subtitle" style={{marginTop: '8px'}}>Width</Typography>
  54. <Group>
  55. <SliderWrapper>
  56. <Sliders />
  57. </SliderWrapper>
  58. 12pt
  59. </Group>
  60. </ExpansionPanel>
  61. );
  62. };
  63. export default Freehand;