Files
stockhome/frontend/src/components/MyAlert.tsx
T

22 lines
406 B
TypeScript

import { Alert } from "@mui/joy";
interface MyAlertProps {
type: "success" | "warning" | "danger" | "neutral" | "primary";
header: string;
text: string;
}
export const MyAlert = (props: MyAlertProps) => {
return (
<Alert
variant="soft"
color={props.type}
className="rounded-2xl drop-shadow-sm"
>
{props.header}
<br />
{props.text}
</Alert>
);
};