我想知道如何使用 muitheme.mixins.toolbar来计算height: calc(100vh - toolbar)?
我目前正在尝试做
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;
Run Code Online (Sandbox Code Playgroud)
但是当我更改视口大小时,工具栏就会变大。Theme.mixins.toolbar.minHeight保持不变而56不是预期64?