Skip to content

Commit

Permalink
try to style loading component, add circular progress spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
redahaq committed Feb 20, 2020
1 parent daba367 commit 578ad66
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"@rmwc/button": "^5.7.2",
"@rmwc/card": "^5.7.2",
"@rmwc/checkbox": "^5.7.2",
"@rmwc/circular-progress": "^5.7.2",
"@rmwc/dialog": "^5.7.2",
"@rmwc/formfield": "^5.7.2",
"@rmwc/list": "^5.7.2",
Expand Down
1 change: 1 addition & 0 deletions src/components/Footer/Footer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import styled from 'styled-components';
import { TypeQ } from '../style';

const Bottom = styled.footer`
display: flex;
Expand Down
22 changes: 21 additions & 1 deletion src/components/Loading/Loading.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
import React from 'react';
import styled from 'styled-components';
import { CircularProgress } from '@rmwc/circular-progress';
import { TypeQ } from '../../components/style';

const CenterWrapper = styled.div`
display: flex;
flex-direction: column;
width: 500vw;
vertical-align: center;
margin: auto;
text-align: center;
align-items: center;
`;

const Spinner = styled(CircularProgress)`
display: flex;
`;

const Loading = () => {
return (
<>
<h1> Loading... </h1>
<CenterWrapper>
<TypeQ use='headline3'> Loading... </TypeQ>
<Spinner />
</CenterWrapper>
</>
);
};
Expand Down

0 comments on commit 578ad66

Please sign in to comment.