tailwindlabs / headlessui

Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.
https://headlessui.com
MIT License
25.02k stars 1.03k forks source link

Remove transition state from render props #3312

Closed RobinMalfait closed 1 week ago

RobinMalfait commented 1 week ago

This PR makes sure that the transition data, such as closed, enter, leave and transition is only mapped as data attributes e.g.: data-closed.

This PR removes the information from the render prop.

<Menu>
  <MenuItems>
    {({ ... /* Won't include `closed`, `enter`, `leave`, or `transition` */ }) => (
      <>
        <MenuItem as="a" href="#">
          Alice
        </MenuItem>
        <MenuItem as="a" href="#">
          Bob
        </MenuItem>
        <MenuItem as="a" href="#">
          Charlie
        </MenuItem>
      </>
    )}
  </MenuItems>
</Menu>
vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2024 1:52pm
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2024 1:52pm