mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Add numeric hotkeys (#380)
* Add numeric hotkeys * Nit: add space after comma
This commit is contained in:
parent
a3aa57d98b
commit
2a8e562e98
2 changed files with 7 additions and 5 deletions
|
@ -433,14 +433,14 @@ export class App extends React.Component<{}, AppState> {
|
|||
private renderShapesSwitcher() {
|
||||
return (
|
||||
<>
|
||||
{SHAPES.map(({ value, icon }) => (
|
||||
{SHAPES.map(({ value, icon }, index) => (
|
||||
<ToolIcon
|
||||
key={value}
|
||||
type="radio"
|
||||
icon={icon}
|
||||
checked={this.state.elementType === value}
|
||||
name="editor-current-shape"
|
||||
title={`${capitalizeString(value)} — ${capitalizeString(value)[0]}`}
|
||||
title={`${capitalizeString(value)} — ${capitalizeString(value)[0]}, ${index + 1}`}
|
||||
onChange={() => {
|
||||
this.setState({ elementType: value });
|
||||
elements = clearSelection(elements);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue