@shopify/app-bridge-host
Version:
App Bridge Host contains components and middleware to be consumed by the app's host, as well as the host itself. The middleware and `Frame` component are responsible for facilitating communication between the client and host, and used to act on actions se
30 lines (27 loc) • 951 B
JavaScript
import { __extends } from 'tslib';
import React from 'react';
import { Loading as Loading$2 } from '@shopify/polaris-internal';
import compose from '@shopify/react-compose';
import withFeature from '../withFeature.js';
import { feature } from '../store/reducers/embeddedApp/loading/index.js';
/**
* The UI component for the Loading feature
* @public
* */
var Loading = /** @class */ (function (_super) {
__extends(Loading, _super);
function Loading() {
return _super !== null && _super.apply(this, arguments) || this;
}
Loading.prototype.render = function () {
var isLoading = this.props.store.isLoading;
return isLoading ? React.createElement(Loading$2, null) : null;
};
return Loading;
}(React.PureComponent));
/**
* The Loading feature with its reducer, actions and UI component
* @public
* */
var Loading$1 = compose(withFeature(feature))(Loading);
export { Loading, Loading$1 as default };