feat: add security section in setting and make it responsive
This commit is contained in:
23
src/components/Toast.tsx
Normal file
23
src/components/Toast.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Alert, Snackbar, type AlertColor } from '@mui/material';
|
||||
import React, { type PropsWithChildren } from 'react';
|
||||
|
||||
export interface ToastProps extends PropsWithChildren {
|
||||
color: AlertColor | undefined;
|
||||
open: boolean;
|
||||
onClose: () => void;
|
||||
}
|
||||
|
||||
export const Toast = ({ color, open, onClose, children }: ToastProps) => {
|
||||
return (
|
||||
<Snackbar sx={{ minWidth: '396px' }} open={open} onClose={onClose}>
|
||||
<Alert
|
||||
onClose={onClose}
|
||||
severity={color}
|
||||
variant="filled"
|
||||
sx={{ width: '100%' }}
|
||||
>
|
||||
{children}
|
||||
</Alert>
|
||||
</Snackbar>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user