UI kit reference
zidane-ui/ keybindings/ testing
import { … } from 'zidane-ui/keybindings/testing'ui/src/keybindings/testing/index.ts
Functions#
createFixtureKeybindingsHostFunction#
Creates a KeybindingsHost held in memory.
function createFixtureKeybindingsHost(
options?: FixtureKeybindingsOptions,
): FixtureKeybindingsHostParameters
| Name | Type | Default | Description |
|---|---|---|---|
| options? | FixtureKeybindingsOptions | {} | The stored overrides, and whether they can be saved. |
Returns
Interfaces#
FixtureKeybindingsControlInterface#
Changes the stored overrides from outside.
interface FixtureKeybindingsControlProperties
| Name | Type | Description |
|---|---|---|
| store | (overrides: Readonly<Record<string, string>>) => void | The file changed on disk (the next |
| stored | () => Readonly<Record<string, string>> | The stored map now. |
FixtureKeybindingsOptionsInterface#
Options of createFixtureKeybindingsHost.
interface FixtureKeybindingsOptionsProperties
| Name | Type | Description |
|---|---|---|
| editable? | boolean | Offer |
| overrides? | Readonly<Record<string, string>> | The stored overrides (action → spec; unknown actions are dropped on read). Default: none. |
Types#
FixtureKeybindingsHostType#
An in-memory KeybindingsHost and its control.
type FixtureKeybindingsHost = KeybindingsHost & { control: FixtureKeybindingsControl }