-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop inline styling where it's unwieldy.
- Loading branch information
Showing
6 changed files
with
81 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,29 @@ | ||
import React from 'react' | ||
import { Paper, Typography, LinearProgress } from '@mui/material' | ||
import styled from '@emotion/styled' | ||
|
||
const OverlayContainer = styled.div({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
position: 'fixed', /* Sit on top of the page content */ | ||
width: '100%', /* Full width (cover the whole page) */ | ||
height: '100%', /* Full height (cover the whole page) */ | ||
top: 0, | ||
left: 0, | ||
right: 0, | ||
bottom: 0, | ||
zIndex: 2000 | ||
}) | ||
|
||
const Overlay = ({ message }: { message: string }): JSX.Element => ( | ||
<div | ||
style={{ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
position: 'fixed', /* Sit on top of the page content */ | ||
width: '100%', /* Full width (cover the whole page) */ | ||
height: '100%', /* Full height (cover the whole page) */ | ||
top: 0, | ||
left: 0, | ||
right: 0, | ||
bottom: 0, | ||
zIndex: 2000 | ||
}} | ||
> | ||
<OverlayContainer> | ||
<div style={{ flex: 1 }} /> | ||
<Paper sx={{ height: '80px', m: '20px', p: '20px', ml: { xs: '20px', sm: '220px' } }}> | ||
<LinearProgress /> | ||
<br /> | ||
<Typography variant='body1'>{message}</Typography> | ||
</Paper> | ||
</div> | ||
</OverlayContainer> | ||
) | ||
|
||
export default Overlay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters