Open aress31 opened 1 week ago
Whilst at it might as well make the siderbar and header conditional rendering like the footer, this way there will be no need to do something like:
<ThemedLayoutV2 Header={CustomHeader} Sider={() => null}>
Hello, @aress31, Nice catch! thanks.
I believe <ThemedLayoutV2 />
can take new props called childrenBoxProps
and containerBoxProps
(I'm fully open to better names) to customize these <Box />
components.
Do you want to work on this?
Why not remove the Box entirely? If a user needs it, they can wrap the content like this:
<Box
component="main"
sx={{
p: { xs: 1, md: 2, lg: 3 },
flexGrow: 1,
bgcolor: (theme) => theme.palette.background.default,
}}
>
Feel free to assign it to me. For the PR, do you create the branch, or should I create it with the issue number?
@aress31 You have a point but If we remove <Box />
right now it causes breaking changes. So, because of that, we can't remove it.
You can create the branch ofc and we have contributing guide. Feel free to ask any questions if you encounter any problems. 🚀
Is your feature request related to a problem? Please describe.
Right now it is not possible to control the children fully, for example background color and padding as children is already wrapped by a styled Box, see:
Describe alternatives you've considered
Provide full control over children rendering.
Additional context
The only thing to do is to delete the wrapping Box component.
Describe the thing to improve
See above.