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,
|
||||
StretchVerticallyIcon,
|
||||
BoxIcon,
|
||||
AngleIcon,
|
||||
} from '@radix-ui/react-icons'
|
||||
import { DMContent } from '~components/Primitives/DropdownMenu'
|
||||
import { Divider } from '~components/Primitives/Divider'
|
||||
|
@ -127,8 +128,8 @@ export function ActionButton(): JSX.Element {
|
|||
app.moveToFront()
|
||||
}, [app])
|
||||
|
||||
const handleDelete = React.useCallback(() => {
|
||||
app.delete()
|
||||
const handleResetAngle = React.useCallback(() => {
|
||||
app.setShapeProps({ rotation: 0 })
|
||||
}, [app])
|
||||
|
||||
const alignTop = React.useCallback(() => {
|
||||
|
@ -231,9 +232,9 @@ export function ActionButton(): JSX.Element {
|
|||
<PinTopIcon />
|
||||
</Tooltip>
|
||||
</ToolButton>
|
||||
<ToolButton disabled={!hasSelection} onClick={handleDelete}>
|
||||
<Tooltip label="Delete" kbd="⌫">
|
||||
<TrashIcon />
|
||||
<ToolButton disabled={!hasSelection} onClick={handleResetAngle}>
|
||||
<Tooltip label="Reset Angle">
|
||||
<AngleIcon />
|
||||
</Tooltip>
|
||||
</ToolButton>
|
||||
</ButtonsRow>
|
||||
|
|
Loading…
Reference in a new issue