From c89060158fab7394c3bddc5eacb0411dbb13785c Mon Sep 17 00:00:00 2001 From: Steve Thomas Date: Mon, 5 Feb 2018 11:54:23 -0500 Subject: Correcting spinner Change-Id: I0531805d63a9d5b8ac6a161281845a6b8cc1f4af Issue-ID: AAI-732 Signed-off-by: Steve Thomas --- src/utils/SpinnerContainer.jsx | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/utils/SpinnerContainer.jsx (limited to 'src/utils') diff --git a/src/utils/SpinnerContainer.jsx b/src/utils/SpinnerContainer.jsx new file mode 100644 index 0000000..448999c --- /dev/null +++ b/src/utils/SpinnerContainer.jsx @@ -0,0 +1,30 @@ +import React, { Component } from 'react'; +import { ClipLoader } from 'react-spinners'; +import {COLOR_BLUE} from 'utils/GlobalConstants.js'; + +class SpinnerContainer extends Component { + render() { + // if loading, show content as busy (ex: grey out) + const spinnerContentClass = this.props.loading ? 'spinner-content' : ''; + return ( +
+
+ +
+
+ {this.props.children} +
+
+ ); + } +} +export default SpinnerContainer; + +SpinnerContainer.propTypes = { + loading: React.PropTypes.bool +}; + +SpinnerContainer.defaultProps = { + loading: false +}; + -- cgit 1.2.3-korg