Update style-panel.tsx

This commit is contained in:
Steve Ruiz 2021-07-03 15:13:07 +01:00
parent a454586237
commit e88567d7dc

View file

@ -8,7 +8,6 @@ import {
ButtonsRow, ButtonsRow,
RowButton, RowButton,
} from 'components/shared' } from 'components/shared'
import { ChevronDown, X } from 'react-feather'
import ShapesFunctions from './shapes-functions' import ShapesFunctions from './shapes-functions'
import AlignDistribute from './align-distribute' import AlignDistribute from './align-distribute'
import QuickColorSelect from './quick-color-select' import QuickColorSelect from './quick-color-select'
@ -20,7 +19,9 @@ import { motion } from 'framer-motion'
import { import {
ClipboardCopyIcon, ClipboardCopyIcon,
ClipboardIcon, ClipboardIcon,
DotsHorizontalIcon,
Share2Icon, Share2Icon,
Cross2Icon,
} from '@radix-ui/react-icons' } from '@radix-ui/react-icons'
const breakpoints = { '@initial': 'mobile', '@sm': 'small' } as any const breakpoints = { '@initial': 'mobile', '@sm': 'small' } as any
@ -45,7 +46,9 @@ export default function StylePanel(): JSX.Element {
size="small" size="small"
onClick={handleStylePanelOpen} onClick={handleStylePanelOpen}
> >
<Tooltip label="More">{isOpen ? <X /> : <ChevronDown />}</Tooltip> <Tooltip label="More">
{isOpen ? <Cross2Icon /> : <DotsHorizontalIcon />}
</Tooltip>
</IconButton> </IconButton>
</ButtonsRow> </ButtonsRow>
{isOpen && <SelectedShapeContent />} {isOpen && <SelectedShapeContent />}
@ -60,10 +63,12 @@ function SelectedShapeContent(): JSX.Element {
<> <>
<hr /> <hr />
<ShapesFunctions /> <ShapesFunctions />
<hr />
<AlignDistribute <AlignDistribute
hasTwoOrMore={selectedShapesCount > 1} hasTwoOrMore={selectedShapesCount > 1}
hasThreeOrMore={selectedShapesCount > 2} hasThreeOrMore={selectedShapesCount > 2}
/> />
<hr />
<RowButton <RowButton
bp={breakpoints} bp={breakpoints}
disabled={selectedShapesCount === 0} disabled={selectedShapesCount === 0}