GeneIT/geneit_app/src/widgets/FamilyCard.tsx

16 lines
442 B
TypeScript
Raw Normal View History

2023-08-18 13:10:16 +00:00
import { Alert, Card } from "@mui/material";
import { PropsWithChildren } from "react";
export function FamilyCard(
p: PropsWithChildren<{ error?: string; success?: string }>
): React.ReactElement {
return (
<Card style={{ margin: "10px auto", maxWidth: "450px" }}>
{p.error && <Alert severity="error">{p.error}</Alert>}
{p.success && <Alert severity="success">{p.success}</Alert>}
{p.children}
</Card>
);
}