gsoft-inc / wl-hopper

Hopper Design System
https://hopper.workleap.design/
Apache License 2.0
3 stars 2 forks source link

Standardize the className, style and children props. #278

Open alexasselin008 opened 4 months ago

alexasselin008 commented 4 months ago

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 commented 3 months ago

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 commented 1 week ago

There was 2 PRs for this:

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