summaryrefslogtreecommitdiff
path: root/apps/web/src/components/keyboard-shortcuts-help.tsx
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2025-07-18 11:26:49 +0200
committerMaze Winther <mazewinther@gmail.com>2025-07-18 11:26:49 +0200
commitb19db0bbea168f757fe1f6c7ff254128373cc593 (patch)
tree65718c8aee56a61b6c42032f8ebd96915cd13dc6 /apps/web/src/components/keyboard-shortcuts-help.tsx
parent4b80c149828d7e730262cb170ab9fb90d0e634d1 (diff)
downloadopencut-b19db0bbea168f757fe1f6c7ff254128373cc593.tar.gz
cleanup
Diffstat (limited to 'apps/web/src/components/keyboard-shortcuts-help.tsx')
-rw-r--r--apps/web/src/components/keyboard-shortcuts-help.tsx18
1 files changed, 16 insertions, 2 deletions
diff --git a/apps/web/src/components/keyboard-shortcuts-help.tsx b/apps/web/src/components/keyboard-shortcuts-help.tsx
index a33ba666..a48b3c21 100644
--- a/apps/web/src/components/keyboard-shortcuts-help.tsx
+++ b/apps/web/src/components/keyboard-shortcuts-help.tsx
@@ -56,9 +56,9 @@ const ShortcutItem = ({ shortcut }: { shortcut: any }) => {
<div key={index} className="flex items-center gap-1">
<div className="flex items-center">
{key.split("+").map((keyPart: string, partIndex: number) => (
- <kbd key={partIndex} className="shortcut-key">
+ <ShortcutKey key={partIndex}>
{getKeyWithModifier(keyPart)}
- </kbd>
+ </ShortcutKey>
))}
</div>
{index < displayKeys.length - 1 && (
@@ -119,3 +119,17 @@ export const KeyboardShortcutsHelp = () => {
</Dialog>
);
};
+
+function ShortcutKey({ children }: { children: React.ReactNode }) {
+ return (
+ <kbd
+ className="inline-flex font-sans text-xs rounded px-2 min-w-[1.5rem] min-h-[1.5rem] leading-none items-center justify-center shadow-sm border mr-1"
+ style={{
+ backgroundColor: "rgba(0, 0, 0, 0.2)",
+ borderColor: "rgba(255, 255, 255, 0.1)"
+ }}
+ >
+ {children}
+ </kbd>
+ );
+};