import React from 'react'; import { type ShortcutKeyLabels } from './shortcut.js'; export type KbdPlatform = 'mac' | 'other'; /** * Whether the reader is on an Apple platform. * * `false` on the server and during hydration, then the real answer — so a * server-rendered "Ctrl" becomes "⌘" after hydration instead of producing a * mismatch. Not exported from the package: `platform` is the public way to * choose. */ export declare function useIsMac(): boolean; export interface KbdProps { /** * A whole shortcut, `+`-joined: `mod+k`, `mod+shift+p`, `esc`. `mod` is ⌘ * on a Mac and Ctrl elsewhere, so write `mod` rather than guessing. Drawn as * one key per part, in the platform's order. */ shortcut?: string; /** One key, as printed: `K`, `Esc`, `/`. Use `shortcut` for a combination. */ children?: React.ReactNode; /** * Leave it out: the reader's platform is detected. Set it only to show a * specific platform's keys — a docs page comparing the two. */ platform?: KbdPlatform; /** * What `shortcut`'s keys are printed as and read out as, for translation — * `{ control: { symbol: 'Strg', name: 'Steuerung' } }`. English by default. * Keyed by the physical key: `mod` is `command` on a Mac, `control` elsewhere. */ keyLabels?: ShortcutKeyLabels; className?: string; } /** * Kbd — a key, or a keyboard shortcut, as printed on the keyboard. * * `` is the element HTML has for this, and a combination is a `` of * ``s — the spec's own shape for "press these together". * * WHAT A SCREEN READER HEARS * * The symbols do not survive being read aloud: VoiceOver says "⌘" as "place of * interest sign" in some voices and "⇧" as "upwards white arrow". So a * shortcut's drawn keys are hidden and a visually hidden copy spells them out * — "Command K", "Control Shift P". */ export declare function Kbd({ shortcut, children, platform, keyLabels, className, }: KbdProps): React.JSX.Element; export declare namespace Kbd { var displayName: string; } //# sourceMappingURL=Kbd.d.ts.map