design-system-components
design-system-components copied to clipboard
Update label prop type in AUradio and AUcheckbox
Feature Request
- [x] I’ve read and understood the Contributing guidelines and have done my best effort to follow them.
- [x] I’ve read and agree to the Code of Conduct.
- [x] I’ve searched for any related issues and avoided creating a duplicate issue.
- [x] I've searched the community forums to check for related issues or feature requests
Is this feature request relating to an existing component? Please describe.
- Component name: control-input react components
- Component version: 3.0.1
Both AUradio and AUcheckbox react components have the label prop with a type of PropTypes.string.isRequired. This is fine until I want to have in the label something more than just a plain text, for example one of the words wrapped in a tag like label <b>bold text</b> or maybe I need to add an icon in the label.
The components allow that, so it works, but it will display a warning in the console: "Failed prop type: Invalid prop label of type object supplied to AUradio, expected string."
I think it would be great to change the prop type to PropTypes.node.isRequired