alert component
This commit is contained in:
1 parent
bb3b06a459
commit
77be1fc37f
1 file changed
+1
-9
@@ -29,20 +29,12 @@ const icons = {
|
|||||||
* @returns {JSX.Element}
|
* @returns {JSX.Element}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const Alert = ({
|
const Alert = ({ variant, title, body, isToast, hasIcon = true, onClick }) => {
|
||||||
variant,
|
|
||||||
title,
|
|
||||||
body,
|
|
||||||
isToast,
|
|
||||||
hasIcon = true,
|
|
||||||
onClick,
|
|
||||||
}) => {
|
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
/* TODO
|
/* TODO
|
||||||
Do we need other variants for alert?
|
Do we need other variants for alert?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Use custom colors if provided, otherwise use theme colors
|
|
||||||
const text = theme.palette.secondary.contrastText;
|
const text = theme.palette.secondary.contrastText;
|
||||||
const border = theme.palette.alert.contrastText;
|
const border = theme.palette.alert.contrastText;
|
||||||
const bg = theme.palette.alert.main;
|
const bg = theme.palette.alert.main;
|
||||||
|
|||||||
Reference in new issue
Block a user