Fix kbd spacing (#325)
This commit is contained in:
parent
9dc58e721e
commit
bbbb9bcabb
6 changed files with 9 additions and 12 deletions
|
@ -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",
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -90,4 +90,4 @@
|
|||
}
|
||||
},
|
||||
"gitHead": "325008ff82bd27b63d625ad1b760f8871fb71af9"
|
||||
}
|
||||
}
|
|
@ -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>}
|
||||
|
|
|
@ -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>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
)}
|
||||
|
|
Loading…
Reference in a new issue