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

Standardize the className, style and children props. #278

Open
alexasselin008 opened this issue May 22, 2024 · 2 comments
Open

Standardize the className, style and children props. #278

alexasselin008 opened this issue May 22, 2024 · 2 comments

Comments

@alexasselin008
Copy link
Member

All RAC components allows className, style and children to be function, where the parameters are the component's state, and the return value the className to append.

<Checkbox className={({isDisabled}) => isDisabled ? "disabled" : "enabled" />

However, some of our component that are not based on react aria do not allow such function, such as the Chip component.
We should make sure that all component with a state (not the stylistic stuff like variant/fluid/size) should allow those functions

@alexasselin008
Copy link
Member Author

For instance, the Avatar, or basically any component extending BaseComponent, aka not RAC component, do not have render props for classname, style and children

@victortrinh2
Copy link
Collaborator

There was 2 PRs for this:

Not sure if I missed any, so I didn't close it.

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

No branches or pull requests

2 participants