Fix kbd spacing (#325)

This commit is contained in:
Steve Ruiz 2021-11-20 15:46:05 +00:00 committed by GitHub
parent 9dc58e721e
commit bbbb9bcabb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 12 deletions

View file

@ -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",

View file

@ -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 @@
"\\~(.*)": "<rootDir>/src/$1"
}
}
}
}

View file

@ -90,4 +90,4 @@
}
},
"gitHead": "325008ff82bd27b63d625ad1b760f8871fb71af9"
}
}

View file

@ -180,7 +180,7 @@ export const ContextMenu = ({ onBlur, children }: ContextMenuProps): JSX.Element
<CMRowButton onClick={handleCopy} kbd="#C">
Copy
</CMRowButton>
<CMRowButton onClick={handleCopySvg} kbd="#C">
<CMRowButton onClick={handleCopySvg} kbd="#⇧C">
Copy as SVG
</CMRowButton>
{isDebugMode && <CMRowButton onClick={handleCopyJson}>Copy as JSON</CMRowButton>}

View file

@ -17,12 +17,9 @@ export function Kbd({
}): JSX.Element | null {
return (
<StyledKbd variant={variant}>
{children
.replaceAll('#', commandKey())
.split('')
.map((k, i) => (
<span key={i}>{k}</span>
))}
{children.split('').map((k, i) => {
return <span key={i}>{k.replace('#', commandKey())}</span>
})}
</StyledKbd>
)
}

View file

@ -94,7 +94,7 @@ export const Menu = React.memo(function Menu({ showSponsorLink, readOnly }: Menu
</DMItem>
)}
{app.callbacks.onSaveProjectAs && (
<DMItem onClick={onSaveProjectAs} kbd="#S">
<DMItem onClick={onSaveProjectAs} kbd="#⇧S">
Save As...
</DMItem>
)}