Skip to content

Commit 97e610a

Browse files
committed
Adds more shortcuts to the list
1 parent afe13a8 commit 97e610a

File tree

2 files changed

+29
-13
lines changed

2 files changed

+29
-13
lines changed

apps/webapp/app/components/Shortcuts.tsx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Keyboard } from "lucide-react";
2+
import { Header3 } from "./primitives/Headers";
23
import { Paragraph } from "./primitives/Paragraph";
34
import {
45
Sheet,
@@ -8,7 +9,6 @@ import {
89
SheetTitle,
910
SheetTrigger,
1011
} from "./primitives/SheetV3";
11-
import { Header3 } from "./primitives/Headers";
1212
import { ShortcutKey } from "./primitives/ShortcutKey";
1313

1414
export function Shortcuts() {
@@ -83,6 +83,25 @@ export function Shortcuts() {
8383
<Shortcut name="Metadata">
8484
<ShortcutKey shortcut={{ key: "m" }} variant="medium/bright" />
8585
</Shortcut>
86+
<Shortcut name="Navigate">
87+
<ShortcutKey shortcut={{ key: "arrowup" }} variant="medium/bright" />
88+
<ShortcutKey shortcut={{ key: "arrowdown" }} variant="medium/bright" />
89+
<ShortcutKey shortcut={{ key: "arrowleft" }} variant="medium/bright" />
90+
<ShortcutKey shortcut={{ key: "arrowright" }} variant="medium/bright" />
91+
</Shortcut>
92+
<Shortcut name="Expand all">
93+
<ShortcutKey shortcut={{ key: "e" }} variant="medium/bright" />
94+
</Shortcut>
95+
<Shortcut name="Collapse all">
96+
<ShortcutKey shortcut={{ key: "w" }} variant="medium/bright" />
97+
</Shortcut>
98+
<Shortcut name="Toggle level">
99+
<ShortcutKey shortcut={{ key: "0" }} variant="medium/bright" />
100+
<Paragraph variant="small" className="ml-1">
101+
to
102+
</Paragraph>
103+
<ShortcutKey shortcut={{ key: "9" }} variant="medium/bright" />
104+
</Shortcut>
86105
</div>
87106
<div className="space-y-3">
88107
<Header3>Alerts page</Header3>
@@ -100,7 +119,7 @@ export function Shortcuts() {
100119
function Shortcut({ children, name }: { children: React.ReactNode; name: string }) {
101120
return (
102121
<div className="flex items-center justify-between gap-x-2">
103-
<Paragraph variant="small">{name}</Paragraph>
122+
<span className="text-sm text-text-dimmed">{name}</span>
104123
<span className="flex items-center gap-x-0.5">{children}</span>
105124
</div>
106125
);

apps/webapp/app/components/primitives/SheetV3.tsx

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
"use client";
2-
3-
import * as React from "react";
41
import * as SheetPrimitive from "@radix-ui/react-dialog";
52
import { cva, type VariantProps } from "class-variance-authority";
6-
import { X } from "lucide-react";
3+
import * as React from "react";
74
import { cn } from "~/utils/cn";
8-
import { ShortcutKey } from "./ShortcutKey";
9-
import { NamedIcon } from "./NamedIcon";
105
import { Header2 } from "./Headers";
6+
import { NamedIcon } from "./NamedIcon";
7+
import { ShortcutKey } from "./ShortcutKey";
118

129
const Sheet = SheetPrimitive.Root;
1310

@@ -117,13 +114,13 @@ SheetDescription.displayName = SheetPrimitive.Description.displayName;
117114

118115
export {
119116
Sheet,
120-
SheetPortal,
121-
SheetOverlay,
122-
SheetTrigger,
123117
SheetClose,
124118
SheetContent,
125-
SheetHeader,
119+
SheetDescription,
126120
SheetFooter,
121+
SheetHeader,
122+
SheetOverlay,
123+
SheetPortal,
127124
SheetTitle,
128-
SheetDescription,
125+
SheetTrigger,
129126
};

0 commit comments

Comments
 (0)