react-native-a11y-container
Version:
UIAccessibilityContainer component for ReactNative
23 lines • 1.37 kB
JavaScript
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 from 'react';
import { View, Platform } from 'react-native';
import { default as A11yContainerViewNative } from './A11yContainerViewNativeComponent';
export let A11yContainerTypes = /*#__PURE__*/function (A11yContainerTypes) {
A11yContainerTypes[A11yContainerTypes["None"] = 0] = "None";
A11yContainerTypes[A11yContainerTypes["DataTable"] = 1] = "DataTable";
A11yContainerTypes[A11yContainerTypes["List"] = 2] = "List";
A11yContainerTypes[A11yContainerTypes["Landmark"] = 3] = "Landmark";
A11yContainerTypes[A11yContainerTypes["SemanticGroup"] = 4] = "SemanticGroup";
return A11yContainerTypes;
}({});
export const A11yContainerView = /*#__PURE__*/React.memo(({
type = 'SemanticGroup',
...props
}) => {
const containerType = A11yContainerTypes[type];
if (Platform.OS !== 'ios') return /*#__PURE__*/React.createElement(View, props);
return /*#__PURE__*/React.createElement(A11yContainerViewNative, _extends({
type: containerType
}, props));
});
//# sourceMappingURL=A11yContainerView.js.map