UNPKG

react-native-a11y

Version:

Improvements of a11y for ReactNative, this library improve work with reader and keyboard focus and reader in general.

30 lines (29 loc) 915 B
import type { HostComponent, ViewProps } from "react-native"; import { DirectEventHandler, Int32 } from "react-native/Libraries/Types/CodegenTypes"; export type FocusChange = Readonly<{ isFocused: boolean; }>; export type EnterPress = Readonly<{ isShiftPressed: boolean; isAltPressed: boolean; isEnterPress: boolean; }>; export type KeyPress = Readonly<{ keyCode: Int32; unicode: Int32; unicodeChar: string; isLongPress: boolean; isAltPressed: boolean; isShiftPressed: boolean; isCtrlPressed: boolean; isCapsLockOn: boolean; hasNoModifiers: boolean; }>; export interface NativeProps extends ViewProps { onFocusChange?: DirectEventHandler<FocusChange>; onKeyUpPress?: DirectEventHandler<KeyPress>; onKeyDownPress?: DirectEventHandler<KeyPress>; canBeFocused?: boolean; } declare const _default: HostComponent<NativeProps>; export default _default;