27 lines
1.3 KiB
JavaScript
27 lines
1.3 KiB
JavaScript
function _extends() { _extends = Object.assign || 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 * as React from 'react';
|
|
import { StyleSheet } from 'react-native';
|
|
import { maybeInitializeFabric } from '../init';
|
|
import GestureHandlerRootViewContext from '../GestureHandlerRootViewContext';
|
|
import GestureHandlerRootViewNativeComponent from '../specs/RNGestureHandlerRootViewNativeComponent';
|
|
export default function GestureHandlerRootView({
|
|
style,
|
|
...rest
|
|
}) {
|
|
// try initialize fabric on the first render, at this point we can
|
|
// reliably check if fabric is enabled (the function contains a flag
|
|
// to make sure it's called only once)
|
|
maybeInitializeFabric();
|
|
return /*#__PURE__*/React.createElement(GestureHandlerRootViewContext.Provider, {
|
|
value: true
|
|
}, /*#__PURE__*/React.createElement(GestureHandlerRootViewNativeComponent, _extends({
|
|
style: style !== null && style !== void 0 ? style : styles.container
|
|
}, rest)));
|
|
}
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
flex: 1
|
|
}
|
|
});
|
|
//# sourceMappingURL=GestureHandlerRootView.android.js.map
|