import React, {PureComponent} from 'react'; import classNames from 'classnames'; import {LoadingBalls} from 'display-library/LoadingBalls'; import './overlay.scss'; interface Props { label: string; show?: boolean; labelPosition?: 'top' | 'middle'; fullPage?: boolean; children?: any; } class LoadingOverlay extends PureComponent { static defaultProps = { labelPosition: 'top', label: 'Loading' }; render() { const {show, label, labelPosition, fullPage, children} = this.props; return (
{show && (
{label}
)} {children}
); } } export default LoadingOverlay;