- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 2k
 
refactor: compound and named pattern #5850
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
Conversation
          
 | 
    
| 
          
 Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the  You can disable this status message by setting the  ✨ Finishing touches🧪 Generate unit tests (beta)
 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment   | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
excellent! @tianenpang
Closes #
📝 Description
This PR refactors the Compound pattern and adds support for the Named pattern.
⛳️ Current behavior (updates)
Previously, only
Foo.Rootwas supported, components had to follow the.Rootusage pattern.🚀 New behavior
Now both compound (
Foo,Foo.Root) and named (FooRoot) component patterns are supported.💣 Is this a breaking change (Yes/No):
Yes.
Component usage remains backward compatible, but type references are not. The namespace-style syntax
Avatar.RootPropsis no longer supported, use the object-style syntax instead:Avatar["RootProps"].Renamed
TabListWrappertoTabListContaineracross all exports, updated CSS class.tabs__list-wrapperto.tabs__list-container, updated data attributedata-slot="tabs-list-wrapper"todata-slot="tabs-list-container".Added Changelog for
v3.0.0-alpha.36.📝 Additional Information
For single-component exports (e.g.
Button), all of the following patterns are now supported:ButtonButton.RootButtonRoot💡 Example
Component Usage Example
Component Usage Example
Type Reference Example