UNPKG

react-native-a11y

Version:

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

23 lines (22 loc) 972 B
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } import React, { useId } from "react"; import { View } from "react-native"; export const A11yOrder = _ref => { let { a11yOrder, onLayout, ...props } = _ref; const onLayoutHandler = e => { onLayout === null || onLayout === void 0 ? void 0 : onLayout(e); a11yOrder.onLayout(); }; const id = (useId === null || useId === void 0 ? void 0 : useId()) || "mock_id"; // ToDo: use native component with tag to nativeTag return /*#__PURE__*/React.createElement(View, _extends({ nativeID: id }, props, { onLayout: onLayoutHandler, ref: a11yOrder.ref })); }; //# sourceMappingURL=A11yOrder.js.map