mirror of
https://github.com/hsjobeki/noogle.git
synced 2024-12-28 08:26:53 +03:00
e4c612674c
* add: seedrandom dependency * add: function of the day
62 lines
1.4 KiB
TypeScript
62 lines
1.4 KiB
TypeScript
import { Card, CardContent, CardProps, Typography } from "@mui/material";
|
|
|
|
import InboxIcon from "@mui/icons-material/Inbox";
|
|
|
|
interface EmptyRecordsPlaceholderProps {
|
|
title: string;
|
|
subtitle?: string;
|
|
icon?: React.ReactNode;
|
|
CardProps?: CardProps;
|
|
}
|
|
|
|
export const EmptyRecordsPlaceholder = (
|
|
props: EmptyRecordsPlaceholderProps
|
|
) => {
|
|
const { title, subtitle, icon, CardProps = {} } = props;
|
|
return (
|
|
<Card
|
|
elevation={0}
|
|
sx={{
|
|
pt: 4,
|
|
my: 3,
|
|
width: "100%",
|
|
border: "none",
|
|
}}
|
|
{...CardProps}
|
|
>
|
|
<CardContent
|
|
sx={{
|
|
backgroundColor: "inherit",
|
|
display: "flex",
|
|
justifyContent: "center",
|
|
alignItems: "center",
|
|
flexDirection: "column",
|
|
height: "100%",
|
|
}}
|
|
>
|
|
<Typography variant="h2" component="div">
|
|
{icon || (
|
|
<InboxIcon fontSize={"inherit"} sx={{ color: "text.secondary" }} />
|
|
)}
|
|
</Typography>
|
|
|
|
<Typography
|
|
variant={"subtitle1"}
|
|
color="text.secondary"
|
|
aria-label={"placeholder-title"}
|
|
>
|
|
{title}
|
|
</Typography>
|
|
|
|
<Typography
|
|
variant={"subtitle2"}
|
|
color="text.secondary"
|
|
aria-label={"placeholder-subtitle"}
|
|
>
|
|
{subtitle}
|
|
</Typography>
|
|
</CardContent>
|
|
</Card>
|
|
);
|
|
};
|