react-native-a11y
Version:
Improvements of a11y for ReactNative, this library improve work with reader and keyboard focus and reader in general.
22 lines (21 loc) • 876 B
JavaScript
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, { useId } from "react";
import { View } from "react-native";
export const A11yOrder = ({
a11yOrder,
onLayout,
...props
}) => {
const onLayoutHandler = e => {
onLayout === null || onLayout === 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