From bbbb9bcabbc56a4591ba19c464ef5b135f49a8ba Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Sat, 20 Nov 2021 15:46:05 +0000 Subject: [PATCH] Fix kbd spacing (#325) --- package.json | 2 +- packages/core/package.json | 4 ++-- packages/tldraw/package.json | 2 +- .../tldraw/src/components/ContextMenu/ContextMenu.tsx | 2 +- packages/tldraw/src/components/Primitives/Kbd/Kbd.tsx | 9 +++------ packages/tldraw/src/components/TopPanel/Menu/Menu.tsx | 2 +- 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index be500a380..e5454593a 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "start:www": "yarn build:packages && lerna run start --parallel & cd apps/www && yarn dev", "start:electron": "lerna run start:electron --stream --parallel", "start:vscode": "code apps/vscode/extension & lerna run start:vscode --parallel; ", - "publish:patch": "yarn test && yarn build:packages && lerna publish patch --ignore tldraw-vscode", + "publish:patch": "yarn test && yarn build:packages && lerna publish patch", "fix:style": "yarn run prettier ./packages/tldraw/src --write", "lerna": "lerna", "test": "lerna run test --stream", diff --git a/packages/core/package.json b/packages/core/package.json index 2793a1dbf..594b87101 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,5 +1,5 @@ { - "version": "1.1.0", + "version": "1.1.1", "name": "@tldraw/core", "description": "The tldraw core renderer and utilities.", "author": "@steveruizok", @@ -81,4 +81,4 @@ "\\~(.*)": "/src/$1" } } -} +} \ No newline at end of file diff --git a/packages/tldraw/package.json b/packages/tldraw/package.json index 168b0e5b6..072979631 100644 --- a/packages/tldraw/package.json +++ b/packages/tldraw/package.json @@ -90,4 +90,4 @@ } }, "gitHead": "325008ff82bd27b63d625ad1b760f8871fb71af9" -} +} \ No newline at end of file diff --git a/packages/tldraw/src/components/ContextMenu/ContextMenu.tsx b/packages/tldraw/src/components/ContextMenu/ContextMenu.tsx index 4625aee5b..75096053e 100644 --- a/packages/tldraw/src/components/ContextMenu/ContextMenu.tsx +++ b/packages/tldraw/src/components/ContextMenu/ContextMenu.tsx @@ -180,7 +180,7 @@ export const ContextMenu = ({ onBlur, children }: ContextMenuProps): JSX.Element Copy - + Copy as SVG {isDebugMode && Copy as JSON} diff --git a/packages/tldraw/src/components/Primitives/Kbd/Kbd.tsx b/packages/tldraw/src/components/Primitives/Kbd/Kbd.tsx index f53d4c03b..1dfc180dc 100644 --- a/packages/tldraw/src/components/Primitives/Kbd/Kbd.tsx +++ b/packages/tldraw/src/components/Primitives/Kbd/Kbd.tsx @@ -17,12 +17,9 @@ export function Kbd({ }): JSX.Element | null { return ( - {children - .replaceAll('#', commandKey()) - .split('') - .map((k, i) => ( - {k} - ))} + {children.split('').map((k, i) => { + return {k.replace('#', commandKey())} + })} ) } diff --git a/packages/tldraw/src/components/TopPanel/Menu/Menu.tsx b/packages/tldraw/src/components/TopPanel/Menu/Menu.tsx index b0a69a34d..b98da152a 100644 --- a/packages/tldraw/src/components/TopPanel/Menu/Menu.tsx +++ b/packages/tldraw/src/components/TopPanel/Menu/Menu.tsx @@ -94,7 +94,7 @@ export const Menu = React.memo(function Menu({ showSponsorLink, readOnly }: Menu )} {app.callbacks.onSaveProjectAs && ( - + Save As... )}