emilkowalski / vaul

A drawer component for React.
https://vaul.emilkowal.ski
MIT License
6.45k stars 215 forks source link

Missing DialogTitle in Radix UI Dialog #506

Closed AndreLuizMag closed 3 days ago

AndreLuizMag commented 1 week ago

Hi! I’m using Vaul version 1.1.1, and I noticed the following issue in the browser console: dialog

It seems that Radix UI requires a DialogTitle for the dialog component, as specified in the Radix UI documentation. You can find more details here: Radix UI Documentation.

Could you please add support for this in the Vaul implementation? Thanks for your help!

MohamedHakem commented 4 days ago

Hi @AndreLuizMag you should be able to fix this by including the DialogTitle within the DialogContent like this

radix-ui-dialog-content-requires-a-dialog-title-error

AndreLuizMag commented 3 days ago

This error occurred because the Drawer title needed to be positioned in another component, which caused it not to be recognized as the title of that specific Drawer. However, I have reworked the component in a different way to avoid the issue. Thanks!!