File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
frontend/src/components/utils Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,23 @@ type Props = {
2323 time : number ;
2424} ;
2525
26+ /**
27+ * Toast Component – Displays a notification or "toast" message.
28+ *
29+ * @remarks
30+ * The toast appears for a limited time and then disappears. The toast's
31+ * color depends on its severity (type of notification).
32+ *
33+ * @param {boolean } props.isOpen - Controls the initial visibility of the toast.
34+ * @param {AlertProps['color'] } props.severity - The type of the alert which determines
35+ * color of the toast. Can be one of the following: 'success', 'info', 'warning', 'error'.
36+ * @param {string } props.message - The message content of the alert.
37+ * @param {number } props.time - The duration (in milliseconds) the toast is visible
38+ * for before it automatically closes.
39+ *
40+ * @return {JSX.Element } The rendered Toast component.
41+ */
42+
2643const Toast = ( { isOpen, severity, message, time } : Props ) => {
2744 const classes = useStyles ( ) ;
2845 const [ open , setOpen ] = useState ( isOpen ) ;
You can’t perform that action at this time.
0 commit comments