refactor(commands): centralize command ids
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Cursor, Hand } from "@phosphor-icons/react";
|
||||
import { commandIds } from "@commands/ids";
|
||||
import type { AppStore } from "@editor/store";
|
||||
import type { InteractionMode, ToolId } from "@editor/tools";
|
||||
import { availableToolIds } from "@editor/tools";
|
||||
@@ -28,7 +29,7 @@ export function ToolOverlay({ activeTool, interactionMode, dispatch }: ToolOverl
|
||||
aria-pressed={active}
|
||||
title={labelForTool(tool)}
|
||||
className={buttonClass(active)}
|
||||
onClick={() => dispatch("tool.setActive", { tool })}
|
||||
onClick={() => dispatch(commandIds.toolSetActive, { tool })}
|
||||
>
|
||||
<Icon size={22} weight={active ? "fill" : "regular"} />
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user