UNPKG

@wscsports/blaze-rtn-sdk

Version:
35 lines (34 loc) 1.64 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BlazeMomentsGridView = exports.BLAZE_MOMENTS_GRID_COMPONENT = void 0; var _reactNative = require("react-native"); var _react = _interopRequireDefault(require("react")); var _BlazeBaseWidgetComponent = require("./BlazeBaseWidgetComponent"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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); } const BLAZE_MOMENTS_GRID_COMPONENT = exports.BLAZE_MOMENTS_GRID_COMPONENT = 'RTNBlazeMomentsGridView'; class BlazeMomentsGridView extends _BlazeBaseWidgetComponent.BlazeBaseWidgetView { getComponentName() { return BLAZE_MOMENTS_GRID_COMPONENT; } render() { const { style } = this.props; const finalStyle = this.props.isEmbeddedInScrollView ? { ...style, height: this.state.height } : style ?? {}; return /*#__PURE__*/_react.default.createElement(MomentsGridViewManager, _extends({}, this.props, this.createBaseProps(), { style: finalStyle, ref: ref => { if (ref) this.ref = ref; } })); } } exports.BlazeMomentsGridView = BlazeMomentsGridView; const MomentsGridViewManager = (0, _reactNative.requireNativeComponent)(BLAZE_MOMENTS_GRID_COMPONENT); //# sourceMappingURL=BlazeMomentsGridView.js.map