Components

Kbd

A key on the keyboard.

scheme

Search with ⌘ K

forSlots(KbdSlots)(Recipes.Kbd({}))

Usage

The function that drew the preview, over the theme module Create a theme writes. The preview passes it the style picked above instead of its default.

export const KbdStyle = forSlots(KbdSlots)(Recipes.Kbd({}))

export const shortcut = (style: NamedStyle<typeof KbdSlots>, h: HtmlBuilder<never>): Html =>
  h.p([], ['Search with ', Kbd.view({ key: '⌘', style }, h), ' ', Kbd.view({ key: 'K', style }, h)])

The recipe ↗This code ↗