tailwindlabs / tailwindui-issues

Bug fixes and feature request tracking for Tailwind UI.
233 stars 4 forks source link

React code example for Dropdowns: `Menu.{SubComponent}` deprecated; use`Menu{SubComponent}` instead #1577

Closed clintharris closed 3 months ago

clintharris commented 3 months ago

What component (if applicable)

Describe the bug

Request doc example update.

The React code example shows use of Menu.Button, Menu.Items, and Menu.Item. These are deprecated in the current version of @headlessui/react and should be replaced with MenuButton, MenuItems, and MenuItem.

RobinMalfait commented 3 months ago

Hey!

Thanks for the bug report, we've updated the Tailwind UI examples and we removed the deprecated components and use the new non-deprecated components instead!

If you want to apply the same changes locally, you can essentially drop the . in Menu.Button -> MenuButton and make sure to update the imports.

Hope this helps!