import Stack from "@mui/material/Stack"; import Typography from "@mui/material/Typography"; import { useTheme } from "@emotion/react"; import PropTypes from "prop-types"; const ToastBody = ({ body }) => { const theme = useTheme(); if (Array.isArray(body)) { return ( {body.map((item, idx) => ( {item} ))} ); } else if (typeof body === "string") { return {body}; } return null; }; ToastBody.propTypes = { body: PropTypes.oneOfType([PropTypes.string, PropTypes.array]), }; export default ToastBody;