mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Add free draw mode (#1570)
This commit is contained in:
parent
36e0c439fb
commit
9ec43d2626
21 changed files with 344 additions and 49 deletions
|
@ -94,11 +94,11 @@ export function ShapesSwitcher({
|
|||
}) {
|
||||
return (
|
||||
<>
|
||||
{SHAPES.map(({ value, icon }, index) => {
|
||||
{SHAPES.map(({ value, icon, key }, index) => {
|
||||
const label = t(`toolBar.${value}`);
|
||||
const shortcut = `${capitalizeString(value)[0]} ${t(
|
||||
"shortcutsDialog.or",
|
||||
)} ${index + 1}`;
|
||||
const shortcut = `${capitalizeString(key)} ${t("shortcutsDialog.or")} ${
|
||||
index + 1
|
||||
}`;
|
||||
return (
|
||||
<ToolButton
|
||||
key={value}
|
||||
|
@ -109,7 +109,7 @@ export function ShapesSwitcher({
|
|||
title={`${capitalizeString(label)} — ${shortcut}`}
|
||||
keyBindingLabel={`${index + 1}`}
|
||||
aria-label={capitalizeString(label)}
|
||||
aria-keyshortcuts={`${label[0]} ${index + 1}`}
|
||||
aria-keyshortcuts={`${key} ${index + 1}`}
|
||||
data-testid={value}
|
||||
onChange={() => {
|
||||
setAppState({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue