-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
49 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from "react"; | ||
import { Paper, Typography, makeStyles, useTheme } from '@material-ui/core'; | ||
import { Skeleton } from '@material-ui/lab'; | ||
|
||
export default function TimelineSkeleton(){ | ||
|
||
const theme = useTheme(); | ||
const useStyles = makeStyles({ | ||
"Paper-root": { | ||
overflow: "hidden" | ||
}, | ||
"padding": { | ||
padding: theme.spacing(1) | ||
} | ||
|
||
}); | ||
const classes = useStyles(); | ||
|
||
return( | ||
<Paper classes={{root: classes["Paper-root"]}}> | ||
<div className={classes.padding}> | ||
<Typography variant="body1"> | ||
<Skeleton /> | ||
</Typography> | ||
</div> | ||
<div className={classes.padding}> | ||
{[...Array(2).keys()].map( _ => <Skeleton /> )} | ||
</div> | ||
</Paper> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Renders a skeleton UI to indicate loading of a timeline item. | ||
|
||
```jsx | ||
import { ThemeProvider } from "@material-ui/core/styles"; | ||
import webqueue2Theme from "../../theme"; | ||
import TimelineActionCard from "./TimelineSkeleton"; | ||
|
||
const theme = webqueue2Theme(false); | ||
|
||
<ThemeProvider theme={theme}> | ||
<TimelineSkeleton /> | ||
</ThemeProvider> | ||
``` | ||
|
||
```jsx static | ||
<TimelineSkeleton /> | ||
``` |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from "./TimelineSkeleton"; |