How can I effectively utilize MUI's theme.mixins.toolbar
to calculate the height using height: calc(100vh - toolbar)
?
I am currently experimenting with this approach:
function SwipeCard() {
return (
<Box
sx={{
height: (theme) => `calc(100vh - ${theme.mixins.toolbar.minHeight}px)`,
paddingTop: (theme) => theme.mixins.toolbar.minHeight + "px",
}}
>
hello world
</Box>
);
}
export default SwipeCard;
However, I noticed that when I adjust the viewport size and the toolbar expands in size, the value of Theme.mixins.toolbar.minHeight
remains fixed at 56
instead of the expected value of 64
?