Browse Source

Fix kbd spacing (#325)

main
Steve Ruiz 4 years ago
parent
commit
bbbb9bcabb
No account linked to committer's email address

+ 1
- 1
package.json View File

30
     "start:www": "yarn build:packages && lerna run start --parallel & cd apps/www && yarn dev",
30
     "start:www": "yarn build:packages && lerna run start --parallel & cd apps/www && yarn dev",
31
     "start:electron": "lerna run start:electron --stream --parallel",
31
     "start:electron": "lerna run start:electron --stream --parallel",
32
     "start:vscode": "code apps/vscode/extension & lerna run start:vscode --parallel; ",
32
     "start:vscode": "code apps/vscode/extension & lerna run start:vscode --parallel; ",
33
-    "publish:patch": "yarn test && yarn build:packages && lerna publish patch --ignore tldraw-vscode",
33
+    "publish:patch": "yarn test && yarn build:packages && lerna publish patch",
34
     "fix:style": "yarn run prettier ./packages/tldraw/src --write",
34
     "fix:style": "yarn run prettier ./packages/tldraw/src --write",
35
     "lerna": "lerna",
35
     "lerna": "lerna",
36
     "test": "lerna run test --stream",
36
     "test": "lerna run test --stream",

+ 2
- 2
packages/core/package.json View File

1
 {
1
 {
2
-  "version": "1.1.0",
2
+  "version": "1.1.1",
3
   "name": "@tldraw/core",
3
   "name": "@tldraw/core",
4
   "description": "The tldraw core renderer and utilities.",
4
   "description": "The tldraw core renderer and utilities.",
5
   "author": "@steveruizok",
5
   "author": "@steveruizok",
81
       "\\~(.*)": "<rootDir>/src/$1"
81
       "\\~(.*)": "<rootDir>/src/$1"
82
     }
82
     }
83
   }
83
   }
84
-}
84
+}

+ 1
- 1
packages/tldraw/package.json View File

90
     }
90
     }
91
   },
91
   },
92
   "gitHead": "325008ff82bd27b63d625ad1b760f8871fb71af9"
92
   "gitHead": "325008ff82bd27b63d625ad1b760f8871fb71af9"
93
-}
93
+}

+ 1
- 1
packages/tldraw/src/components/ContextMenu/ContextMenu.tsx View File

180
               <CMRowButton onClick={handleCopy} kbd="#C">
180
               <CMRowButton onClick={handleCopy} kbd="#C">
181
                 Copy
181
                 Copy
182
               </CMRowButton>
182
               </CMRowButton>
183
-              <CMRowButton onClick={handleCopySvg} kbd="#C">
183
+              <CMRowButton onClick={handleCopySvg} kbd="#C">
184
                 Copy as SVG
184
                 Copy as SVG
185
               </CMRowButton>
185
               </CMRowButton>
186
               {isDebugMode && <CMRowButton onClick={handleCopyJson}>Copy as JSON</CMRowButton>}
186
               {isDebugMode && <CMRowButton onClick={handleCopyJson}>Copy as JSON</CMRowButton>}

+ 3
- 6
packages/tldraw/src/components/Primitives/Kbd/Kbd.tsx View File

17
 }): JSX.Element | null {
17
 }): JSX.Element | null {
18
   return (
18
   return (
19
     <StyledKbd variant={variant}>
19
     <StyledKbd variant={variant}>
20
-      {children
21
-        .replaceAll('#', commandKey())
22
-        .split('')
23
-        .map((k, i) => (
24
-          <span key={i}>{k}</span>
25
-        ))}
20
+      {children.split('').map((k, i) => {
21
+        return <span key={i}>{k.replace('#', commandKey())}</span>
22
+      })}
26
     </StyledKbd>
23
     </StyledKbd>
27
   )
24
   )
28
 }
25
 }

+ 1
- 1
packages/tldraw/src/components/TopPanel/Menu/Menu.tsx View File

94
               </DMItem>
94
               </DMItem>
95
             )}
95
             )}
96
             {app.callbacks.onSaveProjectAs && (
96
             {app.callbacks.onSaveProjectAs && (
97
-              <DMItem onClick={onSaveProjectAs} kbd="#S">
97
+              <DMItem onClick={onSaveProjectAs} kbd="#S">
98
                 Save As...
98
                 Save As...
99
               </DMItem>
99
               </DMItem>
100
             )}
100
             )}

Loading…
Cancel
Save