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 1.07 kB
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } import React from "react"; import { TextInput } from "react-native"; import TextInputWrapperNative from "../../nativeSpecs/A11yTextInputWrapperNativeComponent"; const focusMap = { default: 0, press: 1, auto: 2 }; const blurMap = { default: 0, disable: 1, auto: 2 }; export const KeyboardFocusTextInput = /*#__PURE__*/React.forwardRef(({ focusType = "default", blurType = "default", containerStyle, onFocusChange, ...props }, ref) => /*#__PURE__*/React.createElement(TextInputWrapperNative, { onFocusChange: onFocusChange, focusType: focusMap[focusType], blurType: blurMap[blurType], style: containerStyle, ref: ref }, /*#__PURE__*/React.createElement(TextInput, _extends({ blurOnSubmit: false }, props)))); //# sourceMappingURL=KeyboardFocusTextInput.js.map