blob: cc1ffdb2b3a7853c8362c409e6aa636b0df58fb9 [file] [log] [blame]
Michael Landoefa037d2017-02-19 12:57:33 +02001import React from 'react';
2import {connect} from 'react-redux';
3
4const mapStateToProps = ({loader}) => {
5 return {
6 isLoading: loader.isLoading
7 };
8};
9
10class Loader extends React.Component {
11
12 static propTypes = {
13 isLoading: React.PropTypes.bool.isRequired
14 };
15
16 static defaultProps = {
17 isLoading: false
18 };
19
20 render() {
21 let {isLoading} = this.props;
22
23 return (
24 <div className='onboarding-loader'>
25 {
26 isLoading && <div className='onboarding-loader-backdrop'>
27 <div className='tlv-loader large'></div>
28 </div>
29 }
30 </div>
31 );
32 }
33}
34
35export default connect(mapStateToProps) (Loader);