-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Empty View Component for Chartboxes
- Loading branch information
1 parent
32d07fe
commit 002d0cc
Showing
2 changed files
with
102 additions
and
65 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
Client/src/Pages/Uptime/Details/Components/ChartBoxes/EmptyView.jsx
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,20 @@ | ||
// Components | ||
import { Typography, Box } from "@mui/material"; | ||
import PropTypes from "prop-types"; | ||
|
||
const EmptyView = ({ message = "No Data", size = "h2" }) => { | ||
return ( | ||
<Box m="auto" marginY="25%"> | ||
<Typography variant={size}> | ||
{message} | ||
</Typography> | ||
</Box> | ||
); | ||
}; | ||
|
||
EmptyView.propTypes = { | ||
message: PropTypes.string, | ||
size: PropTypes.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'body1', 'body2']) | ||
}; | ||
|
||
export default EmptyView; |
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