Replies: 3 comments
-
I found a solution is some post in the past https://codesandbox.io/p/sandbox/upbeat-galileo-6rxfm7?file=%2Fsrc%2FApp.tsx%3A65%2C29-65%2C56 <Sheet open={isCampaignModalOpen} onOpenChange={handleClose}> |
Beta Was this translation helpful? Give feedback.
-
I know you mention WITHOUT modifying the component but here is a vesion where it does modify the
How to use it. |
Beta Was this translation helpful? Give feedback.
-
Based on my experience, I found a clean, non-invasive solution for hiding the default close button in Sheet components. Recommended Solution πThe most straightforward and type-safe approach I discovered is using Tailwind CSS arbitrary variant: <SheetContent className="[&>button:first-child]:hidden">
{/* Your sheet content */}
</SheetContent> Happy coding! May your components be clean and your code be elegant. πβ¨ |
Beta Was this translation helpful? Give feedback.
-
Hello, community! π
I'm working with the Sheet.tsx component (a modal window component) and encountered a bit of a puzzle. I want to hide or remove the default close button (X) on the modal window, but can't seem to find a way to do this without making changes directly to the Sheet.tsx component itself.
I've already tried removing SheetClose and even SheetHeader from my code, but the X button still appears. I'm looking for a solution that would allow me to hide this button without needing to modify the source code of the Sheet.tsx component. π
It's important for me to keep the integrity of the component for future use and updates, so I don't want to make changes directly in its code. Maybe there's a way through CSS or some props that I'm missing?
I would be grateful for any ideas or suggestions! π
Thank you in advance for your help! π
Beta Was this translation helpful? Give feedback.
All reactions