2017-07-26 15:50:49 +03:00
|
|
|
import React from 'react';
|
2017-09-20 12:30:53 +03:00
|
|
|
import styled from 'styled-components';
|
|
|
|
|
|
|
|
import Widget from './widget';
|
|
|
|
import P from '../text/p';
|
|
|
|
|
|
|
|
const Container = styled.div`
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
justify-content: center;
|
|
|
|
align-content: center;
|
|
|
|
align-items: center;
|
|
|
|
flex: 1 0 auto;
|
|
|
|
align-self: stretch;
|
2017-07-07 20:04:01 +03:00
|
|
|
`;
|
|
|
|
|
2017-09-20 12:30:53 +03:00
|
|
|
const Loader = styled(Widget)`
|
|
|
|
flex: 0 0 auto;
|
|
|
|
align-self: stretch;
|
2017-07-07 20:04:01 +03:00
|
|
|
`;
|
|
|
|
|
2017-09-20 12:30:53 +03:00
|
|
|
const Msg = P.extend`
|
|
|
|
flex: 0 0 auto;
|
|
|
|
align-self: stretch;
|
|
|
|
text-align: center;
|
|
|
|
margin-bottom: 0;
|
2017-07-07 20:04:01 +03:00
|
|
|
`;
|
|
|
|
|
2017-09-20 12:30:53 +03:00
|
|
|
export default ({ msg }) => (
|
|
|
|
<Container>
|
|
|
|
<Loader />
|
|
|
|
<Msg>{msg || 'Loading...'}</Msg>
|
|
|
|
</Container>
|
2017-08-28 22:21:08 +03:00
|
|
|
);
|