From 15251e6c61f178cea7b7752175738f9dbe28f154 Mon Sep 17 00:00:00 2001 From: Jared Palmer Date: Sun, 5 Jan 2020 10:46:00 -0800 Subject: [PATCH] Add titles to shape buttons with key shortcuts --- src/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index ee1e26a9..df5b3d8d 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -886,6 +886,11 @@ const SHAPES = [ const shapesShortcutKeys = SHAPES.map(shape => shape.value[0]); + +function capitalize(str: string) { + return str.charAt(0).toUpperCase() + str.slice(1); +} + function findElementByKey(key: string) { const defaultElement = "selection"; return SHAPES.reduce((element, shape) => { @@ -1126,7 +1131,7 @@ class App extends React.Component<{}, AppState> {

Shapes

{SHAPES.map(({ value, icon }) => ( -