mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: support menu / dropdown items to have selected
state (#7078)
This commit is contained in:
parent
bfd318e765
commit
12420592ef
8 changed files with 35 additions and 5 deletions
|
@ -318,6 +318,7 @@ export const ShapesSwitcher = ({
|
|||
activeEmbeddable: null,
|
||||
});
|
||||
}}
|
||||
selected={activeTool.type === "frame"}
|
||||
/>
|
||||
<ToolButton
|
||||
className={clsx("Shape", { fillable: false })}
|
||||
|
@ -348,6 +349,7 @@ export const ShapesSwitcher = ({
|
|||
activeEmbeddable: null,
|
||||
});
|
||||
}}
|
||||
selected={activeTool.type === "embeddable"}
|
||||
/>
|
||||
</>
|
||||
) : (
|
||||
|
@ -378,6 +380,7 @@ export const ShapesSwitcher = ({
|
|||
icon={frameToolIcon}
|
||||
shortcut={KEYS.F.toLocaleUpperCase()}
|
||||
data-testid="toolbar-frame"
|
||||
selected={activeTool.type === "frame"}
|
||||
>
|
||||
{t("toolBar.frame")}
|
||||
</DropdownMenu.Item>
|
||||
|
@ -394,6 +397,7 @@ export const ShapesSwitcher = ({
|
|||
}}
|
||||
icon={EmbedIcon}
|
||||
data-testid="toolbar-embeddable"
|
||||
selected={activeTool.type === "embeddable"}
|
||||
>
|
||||
{t("toolBar.embeddable")}
|
||||
</DropdownMenu.Item>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue