ost-ui
Version:
ost ui for react
40 lines (31 loc) • 1.1 kB
JavaScript
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import OstMask from '../OstMask/index';
import svgLoading from './images/loading.svg';
var OstLoading = function (_Component) {
_inherits(OstLoading, _Component);
function OstLoading() {
_classCallCheck(this, OstLoading);
return _possibleConstructorReturn(this, _Component.apply(this, arguments));
}
OstLoading.prototype.render = function render() {
var isLoading = this.props.isLoading;
return React.createElement(
OstMask,
{ show: isLoading },
React.createElement(
'div',
{ className: 'ost-loading' },
React.createElement('img', { src: svgLoading, className: 'ost-loading-svg' })
)
);
};
return OstLoading;
}(Component);
export default OstLoading;
OstLoading.propTypes = {
isLoading: PropTypes.bool.isRequired
};