1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- import React from 'react';
- import Icon from '../Icon';
- import Button from '../Button';
- import ExpansionPanel from '../ExpansionPanel';
- import Typography from '../Typography';
- import SelectBox from '../SelectBox';
- import ColorSelect from '../ColorSelector';
- import Sliders from '../Sliders';
- import { Group, Item, SliderWrapper } from '../../global/toolStyled';
- const BrushOptions = [
- {
- key: 'freehand',
- content: <Icon glyph="freehand" />,
- value: '',
- },
- {
- key: 'markpen',
- content: <Icon glyph="markpen" />,
- value: '',
- },
- ];
- type Props = {
- isActive: boolean;
- onClick: () => void;
- };
- const Freehand: React.FunctionComponent<Props> = ({
- isActive,
- onClick,
- }: Props) => (
- <ExpansionPanel
- label={(
- <Button
- shouldFitContainer
- align="left"
- onClick={onClick}
- isActive={isActive}
- >
- <Icon glyph="freehand" style={{ marginRight: '10px' }} />
- Freehand
- </Button>
- )}
- isActive={isActive}
- >
- <Typography variant="subtitle" style={{ marginTop: '4px' }}>Tools</Typography>
- <Group>
- <SelectBox options={BrushOptions} />
- <Item size="small">
- <Icon glyph="eraser" />
- </Item>
- <Item size="small">
- <Icon glyph="redo" />
- </Item>
- <Item size="small">
- <Icon glyph="undo" />
- </Item>
- </Group>
- <ColorSelect showTitle color="" onClick={(): void => {}} />
- <Typography variant="subtitle" style={{ marginTop: '4px' }}>Opacity</Typography>
- <Group>
- <SliderWrapper>
- <Sliders />
- </SliderWrapper>
- 40%
- </Group>
- <Typography variant="subtitle" style={{ marginTop: '8px' }}>Width</Typography>
- <Group>
- <SliderWrapper>
- <Sliders />
- </SliderWrapper>
- 12pt
- </Group>
- </ExpansionPanel>
- );
- export default Freehand;
|