Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose missing data-disabled and data-focus attributes on the TabsPanel, MenuButton, PopoverButton and DisclosureButton components #3061

Merged
merged 8 commits into from
Mar 27, 2024

Conversation

RobinMalfait
Copy link
Member

This PR exposes more data attributes on some components, mainly:

  • Expose data-focus on the TabsPanel component
  • Expose data-disabled on the MenuButton component
  • Expose data-disabled on the PopoverButton component
  • Expose data-disabled on the DisclosureButton component

This PR also cleans up some repetition on related to this, because in some places we used props.autoFocus ?? false or props.disabled ?? false in multiple spots. Now, this is destructured from the props object with a fallback.

Copy link

vercel bot commented Mar 27, 2024

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 Mar 27, 2024 2:40pm
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 27, 2024 2:40pm

@RobinMalfait RobinMalfait changed the title Expose missing data attributes Expose missing data-disabled and data-focus attributes on the TabsPanel, MenuButton, PopoverButton and DisclosureButton components Mar 27, 2024
Copy link
Contributor

@thecrypticace thecrypticace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, one question but not a blocker for anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants