add: some util to dashboard
This commit is contained in:
@@ -1,5 +1,22 @@
|
||||
import { Card } from "@mui/material";
|
||||
import { Typography } from "@mui/material";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
const DashboardCard = Card;
|
||||
interface DashboardCardProps {
|
||||
title: string;
|
||||
children?: ReactNode;
|
||||
}
|
||||
const DashboardCard = (props: DashboardCardProps) => {
|
||||
const { children, title } = props;
|
||||
return (
|
||||
<div className="h-full w-full bg-slate-50 shadow-sm shadow-slate-500">
|
||||
<div className="h-full w-full px-3 py-2">
|
||||
<Typography variant="h6" color={"secondary"}>
|
||||
{title}
|
||||
</Typography>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export { DashboardCard };
|
||||
|
||||
Reference in New Issue
Block a user