[bug]: Incorrect Usage of <DrawerClose> in Documentation Causes HTML Button Nesting Error #4662
Open
2 tasks done
Labels
bug
Something isn't working
Describe the bug
I noticed an issue in the documentation for the component that could cause HTML hydration errors. The current example has a element nested inside another element, which is invalid in HTML and leads to the following warning:
Warning: In HTML
<button>
cannot be a descendant of<button>
. This will cause a hydration error.The current documentation demonstrates the usage of the Drawer component as follows:
The recommended fix is to update the documentation to include the asChild property on , as shown below:
Affected component/components
DrawerClose
How to reproduce
Implement the code as per the current documentation.
Observe the hydration error in the browser console.
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Before submitting
The text was updated successfully, but these errors were encountered: