lbry-desktop/ui/component/common/loading-screen.jsx

27 lines
527 B
React
Raw Normal View History

2018-03-26 23:32:43 +02:00
// @flow
import React from 'react';
import Spinner from 'component/spinner';
2018-03-26 23:32:43 +02:00
type Props = {
2019-08-02 08:28:14 +02:00
status?: string,
spinner: boolean,
2018-03-26 23:32:43 +02:00
};
2018-03-26 23:32:43 +02:00
class LoadingScreen extends React.PureComponent<Props> {
static defaultProps = {
spinner: true,
};
render() {
const { status, spinner } = this.props;
return (
<div className="content__loading">
{spinner && <Spinner light />}
{status && <span className="content__loading-text">{status}</span>}
2018-03-26 23:32:43 +02:00
</div>
);
}
}
export default LoadingScreen;