SheetPage: Un-abstracting SheetPortal and SheetOverlay from SheetContent #7476
hardik-gupta
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
While trying to control the z-index for
<SheetContent>
I noticed it does not apply to<SheetOverlay>
as the classes are given to<SheetPrimitive.Content>
(see: https://ui.shadcn.com/docs/components/sheet#installation ), causing both to have different values when I think they should be the same ? Due to this I think we can't really customize it, for example, set a different overlay color based on color of the sheet open. How they are currently structured, I can't find a way to customize the overlay.Is there something already in place for such cases that I am missing ?
I have tried to come up with an implementation of my own, a
<SheetPage>
which is nothing but<SheetContent>
but without the overlay and portal abstracted. It does not break any existing implementation, rather it is an addition. I could have changed the source code but I was looking for a hollistic approach.I am looking for thoughts on this one. Is this a good solution ? Anything I am missing here ?
Here is a devbox link with my example implementation.
Beta Was this translation helpful? Give feedback.
All reactions