Skip to content

feat(react-label): add useLabelBase_unstable hook#35905

Merged
dmytrokirpa merged 3 commits intomicrosoft:masterfrom
dmytrokirpa:feat/react-label-base-hooks
Mar 31, 2026
Merged

feat(react-label): add useLabelBase_unstable hook#35905
dmytrokirpa merged 3 commits intomicrosoft:masterfrom
dmytrokirpa:feat/react-label-base-hooks

Conversation

@dmytrokirpa
Copy link
Copy Markdown
Contributor

Summary

  • Adds LabelBaseProps type derived from LabelProps by omitting design props (size, weight)
  • Adds LabelBaseState type derived from LabelState by omitting the same design props
  • Adds useLabelBase_unstable hook that handles pure slot structure logic (root, required, disabled) without design-specific concerns
  • Refactors useLabel_unstable to call useLabelBase_unstable and spread its results, then add design props
  • Updates renderLabel_unstable to accept LabelBaseState instead of LabelState
  • Exports new types and hook from the package public index

Tracking: #35562

🤖 Generated with Claude Code

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants