1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- import React from 'react';
- import Button from '../Button';
- import ExpansionPanel from '../ExpansionPanel';
- import Icon from '../Icon';
- import SelectBox from '../SelectBox';
- import Typography from '../Typography';
- import ColorSelect from '../ColorSelector';
- import Sliders from '../Sliders';
- import { Group, SliderWrapper } from '../../global/toolStyled';
- const shapeOptions = [
- {
- key: 'circle',
- content: <Icon glyph="circle" />,
- value: '',
- },
- {
- key: 'rectangle',
- content: <Icon glyph="rectangle" />,
- value: '',
- },
- {
- key: 'line',
- content: <Icon glyph="line" />,
- value: '',
- },
- {
- key: 'arrow',
- content: <Icon glyph="arrow" />,
- value: '',
- },
- ];
- const typeOptions = [
- {
- key: 'border',
- content: <Icon glyph="border" />,
- value: '',
- },
- {
- key: 'fill',
- content: <Icon glyph="fill" />,
- value: '',
- },
- ];
- type Props = {
- isActive: boolean;
- onClick: () => void;
- };
- const Shape: React.FunctionComponent<Props> = ({
- isActive,
- onClick,
- }: Props) => (
- <ExpansionPanel
- label={(
- <Button
- shouldFitContainer
- align="left"
- onClick={onClick}
- isActive={isActive}
- >
- <Icon glyph="shape" style={{ marginRight: '10px' }} />
- Shape
- </Button>
- )}
- isActive={isActive}
- >
- <Typography>Shape</Typography>
- <SelectBox options={shapeOptions} style={{ marginRight: '10px' }} />
- <SelectBox options={typeOptions} />
- <ColorSelect showTitle color="" onClick={(): void => {}} />
- <Typography variant="subtitle" style={{ marginTop: '8px' }}>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 Shape;
|