react-ui
react-ui copied to clipboard
make transferProps available to users
In general the transferProps function is useful for better accesibility while safely keeping the component code short and manageable.
It would be useful to export it so it can be used inside component libraries based on RUI.
I propose:
- Move the
transferProps.jstosrc/utilsand export it (likeclassNames) - Create a new documentation page with examples in the
Helpers > JS Helperssection (likeclassNames) - Change the
Forwarding HTML Attributessection in each componentsREADME.mdto link to the new page. This would allow us to also remove examples as they would be provided on the dedicated page.
Agreed on video call, that we want to do this.
Users might choose to use our implementation of transferProps or they might roll out their own based on their needs. We do not want to support configuring the transferProps function as it is too simple to be worth it.