From 82626533610c3387952183a736bc24a1140fbe70 Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Thu, 19 Dec 2024 13:50:26 -0800 Subject: [PATCH] Make all keybindings in docsite have title (#1580) --- docs/src/components/kbd.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/components/kbd.tsx b/docs/src/components/kbd.tsx index 69fee9ebf..d8550521a 100644 --- a/docs/src/components/kbd.tsx +++ b/docs/src/components/kbd.tsx @@ -38,9 +38,9 @@ function convertKey(platform: Platform, key: string): [any, string, boolean] { return ["⇧", "Shift", true]; } if (key == "Escape") { - return ["Esc", null, false]; + return ["Esc", "Escape", false]; } - return [key, null, false]; + return [key.length > 1 ? key : key.toUpperCase(), key, false]; } // Custom KBD component @@ -50,7 +50,7 @@ const KbdInternal = ({ k }: { k: string }) => { const keyElems = keys.map((key, i) => { const [displayKey, title, symbol] = convertKey(platform, key); return ( - + {displayKey} );