Update ActionButton.tsx (#320)
This commit is contained in:
parent
0685ca3871
commit
8531971896
1 changed files with 6 additions and 5 deletions
|
@ -27,6 +27,7 @@ import {
|
||||||
StretchHorizontallyIcon,
|
StretchHorizontallyIcon,
|
||||||
StretchVerticallyIcon,
|
StretchVerticallyIcon,
|
||||||
BoxIcon,
|
BoxIcon,
|
||||||
|
AngleIcon,
|
||||||
} from '@radix-ui/react-icons'
|
} from '@radix-ui/react-icons'
|
||||||
import { DMContent } from '~components/Primitives/DropdownMenu'
|
import { DMContent } from '~components/Primitives/DropdownMenu'
|
||||||
import { Divider } from '~components/Primitives/Divider'
|
import { Divider } from '~components/Primitives/Divider'
|
||||||
|
@ -127,8 +128,8 @@ export function ActionButton(): JSX.Element {
|
||||||
app.moveToFront()
|
app.moveToFront()
|
||||||
}, [app])
|
}, [app])
|
||||||
|
|
||||||
const handleDelete = React.useCallback(() => {
|
const handleResetAngle = React.useCallback(() => {
|
||||||
app.delete()
|
app.setShapeProps({ rotation: 0 })
|
||||||
}, [app])
|
}, [app])
|
||||||
|
|
||||||
const alignTop = React.useCallback(() => {
|
const alignTop = React.useCallback(() => {
|
||||||
|
@ -231,9 +232,9 @@ export function ActionButton(): JSX.Element {
|
||||||
<PinTopIcon />
|
<PinTopIcon />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</ToolButton>
|
</ToolButton>
|
||||||
<ToolButton disabled={!hasSelection} onClick={handleDelete}>
|
<ToolButton disabled={!hasSelection} onClick={handleResetAngle}>
|
||||||
<Tooltip label="Delete" kbd="⌫">
|
<Tooltip label="Reset Angle">
|
||||||
<TrashIcon />
|
<AngleIcon />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</ToolButton>
|
</ToolButton>
|
||||||
</ButtonsRow>
|
</ButtonsRow>
|
||||||
|
|
Loading…
Reference in a new issue