refactor: add custom alert component and remove all other Alert standard components in all components
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user