emilkowalski / vaul

An unstyled drawer component for React.
https://vaul.emilkowal.ski
MIT License
5.26k stars 169 forks source link

Export DialogProps type #348

Open martynaskadisa opened 1 month ago

martynaskadisa commented 1 month ago

When trying to use Vaul in a component library that also re-exports TypeScript types (via something like vite-plugin-dts), type generation would fail with an external module error:

error TS4023: Exported variable 'Root' has or is using name 'WithFadeFromProps' from external module "/%project%/node_modules/vaul/dist/index" but cannot be named.

Marking DialogProps with an export keyword fixes this issue. There's also a bonus of not having to use React.ComponentProps<T> when the type is properly exported from the library.

vercel[bot] commented 1 month ago

@martynaskadisa is attempting to deploy a commit to the emil Team on Vercel.

A member of the Team first needs to authorize it.