summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src/components/keybind.stories.tsx
blob: a458a53a7421caf9d4c90bdc2abb845ce9b07dfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// @ts-nocheck
import * as mod from "./keybind"
import { create } from "../storybook/scaffold"

const docs = `### Overview
Keyboard shortcut pill for displaying keybindings.

Pair with menu items or command palettes.

### API
- Children render the key sequence text.
- Accepts standard span props.

### Variants and states
- Single visual style.

### Behavior
- Presentational only.

### Accessibility
- Ensure text conveys the shortcut (e.g., "Cmd+K").

### Theming/tokens
- Uses \`data-component="keybind"\`.

`

const story = create({ title: "UI/Keybind", mod, args: { children: "Cmd+K" } })
export default {
  title: "UI/Keybind",
  id: "components-keybind",
  component: story.meta.component,
  tags: ["autodocs"],
  parameters: {
    docs: {
      description: {
        component: docs,
      },
    },
  },
}

export const Basic = story.Basic