Closed normanyu closed 1 year ago
Hey!
Can you share a minimal reproduction repo that we can clone down instead? That way we know that all the files are the same, that we have the same packages (lock file) and so on.
One thing I notice is that in your package.json
you don't have the @headlessui/react
package installed.
Just starting from your files, it does seem to work for me out of the box:
Once a minimal repo is ready, I'm more than happy to take a look!
@RobinMalfait
Installing @headlessui/react 1.7.16 fixed this issue. Somehow it was still runningimport { Dialog, Transition } from "@headlessui/react";
even without the package installed.
Oh beautiful, glad you figured it out! 💪
What component (if applicable)
Describe the bug When trying to use the
className
property for Dialog, I get a Typescript error: Type 'string' is not assignable to type 'never'.ts(2322)See Screenshot
To Reproduce Just copy and paste the component into a project.
Expected behavior I'd expect no typescript errors. Using className here is consistent with the example in the Headless Documentation.
Screenshots
Additional context package.json, tsconfig.js and tailwind.config.js here for reference.