diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-10-25 10:31:38 +0200 |
---|---|---|
committer | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-10-25 14:28:47 +0200 |
commit | 37a16f673702a7475766338feac6f235ff513509 (patch) | |
tree | 1a526afa08a145ed289dfde98d30924a917ab0d0 /server/sonar-web/src/main/js/components/common | |
parent | ea34a3048623669bd4602b8dee745e144b503852 (diff) | |
download | sonarqube-37a16f673702a7475766338feac6f235ff513509.tar.gz sonarqube-37a16f673702a7475766338feac6f235ff513509.zip |
SONAR-9936 Add loading spinner when doing the license preview
Diffstat (limited to 'server/sonar-web/src/main/js/components/common')
-rw-r--r-- | server/sonar-web/src/main/js/components/common/DeferredSpinner.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/components/common/DeferredSpinner.tsx b/server/sonar-web/src/main/js/components/common/DeferredSpinner.tsx index a840e2ea6f5..5c434d380d8 100644 --- a/server/sonar-web/src/main/js/components/common/DeferredSpinner.tsx +++ b/server/sonar-web/src/main/js/components/common/DeferredSpinner.tsx @@ -24,7 +24,8 @@ interface Props { children?: JSX.Element; className?: string; loading?: boolean; - timeout: number; + customSpinner?: JSX.Element; + timeout?: number; } interface State { @@ -71,7 +72,9 @@ export default class DeferredSpinner extends React.PureComponent<Props, State> { render() { if (this.state.showSpinner) { - return <i className={classNames('spinner', this.props.className)} />; + return ( + this.props.customSpinner || <i className={classNames('spinner', this.props.className)} /> + ); } return (this.props.children as JSX.Element) || null; } |