index.tsx 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. import React from 'react';
  2. import Icon from '../Icon';
  3. import Button from '../Button';
  4. import Typography from '../Typography';
  5. import ExpansionPanel from '../ExpansionPanel';
  6. import Sliders from '../Sliders';
  7. import ColorSelect from '../ColorSelect';
  8. import SelectBox from '../SelectBox';
  9. import { Wrapper, Group, Item, SliderWrapper } from '../../global/toolStyled';
  10. const fontOptions = [
  11. {
  12. key: 'helvetica',
  13. content: 'Helvetica',
  14. value: '',
  15. },
  16. {
  17. key: 'arial',
  18. content: 'Arial',
  19. value: '',
  20. },
  21. ];
  22. const sizeOptions = [
  23. {
  24. key: 'size_12',
  25. content: 12,
  26. value: '',
  27. },
  28. {
  29. key: 'size_14',
  30. content: 14,
  31. value: '',
  32. },
  33. {
  34. key: 'size_18',
  35. content: 18,
  36. value: '',
  37. },
  38. {
  39. key: 'size_24',
  40. content: 24,
  41. value: '',
  42. },
  43. {
  44. key: 'size_36',
  45. content: 36,
  46. value: '',
  47. },
  48. {
  49. key: 'size_48',
  50. content: 48,
  51. value: '',
  52. },
  53. {
  54. key: 'size_64',
  55. content: 64,
  56. value: '',
  57. },
  58. ];
  59. const TextTools = () => {
  60. return (
  61. <ExpansionPanel
  62. label={
  63. <Button shouldFitContainer align="left">
  64. <Icon glyph="text" style={{marginRight: '10px'}}/>
  65. Text
  66. </Button>
  67. }
  68. >
  69. <Wrapper>
  70. <Typography variant="subtitle" style={{marginTop: '8px'}}>Fonts</Typography>
  71. <Group>
  72. <SelectBox options={fontOptions} />
  73. <Item size="small">
  74. <Icon glyph="bold" />
  75. </Item>
  76. <Item size="small">
  77. <Icon glyph="italic" />
  78. </Item>
  79. </Group>
  80. </Wrapper>
  81. <Wrapper width="40%">
  82. <Typography variant="subtitle" style={{marginTop: '8px'}}>Size</Typography>
  83. <Group>
  84. <SelectBox options={sizeOptions} />
  85. </Group>
  86. </Wrapper>
  87. <Wrapper width="60%">
  88. <Typography variant="subtitle" style={{marginTop: '8px'}}>Align</Typography>
  89. <Group>
  90. <Item size="small">
  91. <Icon glyph="align-left" />
  92. </Item>
  93. <Item size="small">
  94. <Icon glyph="align-center" />
  95. </Item>
  96. <Item size="small">
  97. <Icon glyph="align-right" />
  98. </Item>
  99. </Group>
  100. </Wrapper>
  101. <Wrapper>
  102. <ColorSelect />
  103. </Wrapper>
  104. <Wrapper>
  105. <Typography variant="subtitle" style={{marginTop: '8px'}}>Opacity</Typography>
  106. <Group>
  107. <SliderWrapper>
  108. <Sliders />
  109. </SliderWrapper>
  110. 40%
  111. </Group>
  112. </Wrapper>
  113. </ExpansionPanel>
  114. );
  115. };
  116. export default TextTools;