index.tsx 1.6 KB

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