react-ui icon indicating copy to clipboard operation
react-ui copied to clipboard

make transferProps available to users

Open mbohal opened this issue 1 year ago • 1 comments

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:

  1. Move the transferProps.js to src/utils and export it (like classNames)
  2. Create a new documentation page with examples in the Helpers > JS Helpers section (like classNames)
  3. Change the Forwarding HTML Attributes section in each components README.md to link to the new page. This would allow us to also remove examples as they would be provided on the dedicated page.

mbohal avatar Feb 15 '24 16:02 mbohal

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.

mbohal avatar Mar 18 '24 07:03 mbohal