import { Colors } from '../../styles'; import * as React from 'react'; import { Background, FullScreenContent, Content, StyledLoading } from './styled-loading'; interface Props { loading: boolean; fullscreen?: boolean; label?: React.ReactNode; color: Colors; onClose?: () => void; } interface SpinnerProps { label: React.ReactNode; color: Colors; } const Spinner = (props: SpinnerProps) => ( <> {props.label}
) const Loading = (props: Props) => { if (!props.loading) { return null; } if (props.fullscreen) { return ( ); } return( ) }; Loading.defaultProps = { color: 'primary', } export default Loading;