Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | 45x 8x 8x | import AlertIcon from "@assets/icons/AlertIcon";
import { Box, Stack, SxProps } from "@mui/material";
import GiveText from "@shared/Text/GiveText";
import { useAppTheme } from "@theme/v2/Provider";
import { ReactNode } from "react";
const StyleWarningMessage = ({
title = "Attention",
description,
renderAction,
sx,
strokeIconColor,
}: {
title?: string;
description?: string;
renderAction?: () => ReactNode;
sx?: SxProps;
strokeIconColor?: string;
}) => {
const { palette } = useAppTheme();
return (
<Stack
direction="row"
gap="20px"
// alignItems="center"
sx={{
padding: "20px",
marginX: "12px",
borderRadius: "12px",
backgroundColor: palette.primitive?.transparent["darken-5"],
alignItems: "center",
...sx,
}}
>
<Box>
<AlertIcon
{...(strokeIconColor && {
stroke: strokeIconColor,
})}
/>
</Box>
<Stack gap={1}>
<GiveText
fontSize="14px"
fontWeight={573}
sx={{ color: palette.primitive?.neutral[90] }}
>
{title}
</GiveText>
<GiveText fontSize="14px">{description}</GiveText>
{renderAction?.()}
</Stack>
</Stack>
);
};
export default StyleWarningMessage;
|