UNPKG

@kobalte/core

Version:

Unstyled components and primitives for building accessible web apps and design systems with SolidJS.

18 lines (15 loc) 664 B
import { MaybeAccessor } from '@kobalte/utils'; import { Accessor } from 'solid-js'; interface CreateEscapeKeyDownProps { /** Whether the escape key down events should be listened or not. */ isDisabled?: MaybeAccessor<boolean | undefined>; /** The owner document to attach listeners to. */ ownerDocument?: Accessor<Document>; /** Event handler called when the escape key is down. */ onEscapeKeyDown?: (event: KeyboardEvent) => void; } /** * Listens for when the escape key is down on the document. */ declare function createEscapeKeyDown(props: CreateEscapeKeyDownProps): void; export { CreateEscapeKeyDownProps, createEscapeKeyDown };