joyent-portal/packages/ui-toolkit/src/status-loader/index.js

36 lines
640 B
JavaScript
Raw Normal View History

2017-07-26 15:50:49 +03:00
import React from 'react';
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;
`;
const Loader = styled(Widget)`
flex: 0 0 auto;
align-self: stretch;
`;
const Msg = P.extend`
flex: 0 0 auto;
align-self: stretch;
text-align: center;
margin-bottom: 0;
`;
export default ({ msg }) => (
<Container>
<Loader />
<Msg>{msg || 'Loading...'}</Msg>
</Container>
2017-08-28 22:21:08 +03:00
);