@try-at-software/input-elements
Version:
A package providing different input elements that are extensible and easily configurable for your custom needs.
25 lines (24 loc) • 936 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PresentationRenderer = void 0;
const react_1 = require("@fluentui/react");
const React = require("react");
class PresentationRenderer extends React.Component {
render() {
const { isVisible } = this.props;
if (!isVisible)
return null;
const { isLoading } = this.props;
if (isLoading) {
const { loadingIndicator: LoadingIndicator } = this.props;
if (LoadingIndicator)
return React.createElement(LoadingIndicator, null);
return React.createElement(react_1.Spinner, { size: react_1.SpinnerSize.medium });
}
const { renderInternalContent } = this.props;
if (!renderInternalContent)
return null;
return renderInternalContent();
}
}
exports.PresentationRenderer = PresentationRenderer;