A themed box container with optional header and close icon, used to wrap content in modals, cards, or sidebars.
Remarks
This component conditionally renders a title and close button if headerTitle or onClose is provided.
It supports dynamic theming using useColorParser, and custom styles via the sx prop.
Example
<BoxWithCloseContainer headerTitle="Details" onClose={() =>setOpen(false)} backgroundColor="background" > <Typography>This is some content inside the container.</Typography> </BoxWithCloseContainer>
A themed box container with optional header and close icon, used to wrap content in modals, cards, or sidebars.
Remarks
This component conditionally renders a title and close button if
headerTitle
oronClose
is provided. It supports dynamic theming usinguseColorParser
, and custom styles via thesx
prop.Example