UNPKG

react-native-a11y

Version:

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

28 lines (27 loc) 878 B
import type { HostComponent, ViewProps } from "react-native"; import { BubblingEventHandler, 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; isLongPress: boolean; isAltPressed: boolean; isShiftPressed: boolean; isCtrlPressed: boolean; isCapsLockOn: boolean; hasNoModifiers: boolean; }>; export interface NativeProps extends ViewProps { onFocusChange?: BubblingEventHandler<FocusChange>; onKeyUpPress?: BubblingEventHandler<KeyPress>; onKeyDownPress?: BubblingEventHandler<KeyPress>; canBeFocused?: boolean; } declare const _default: HostComponent<NativeProps>; export default _default;