Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Update label prop type in AUradio and AUcheckbox #899

Open
4 tasks done
kolking opened this issue Mar 10, 2020 · 0 comments
Open
4 tasks done

Update label prop type in AUradio and AUcheckbox #899

kolking opened this issue Mar 10, 2020 · 0 comments

Comments

@kolking
Copy link

kolking commented Mar 10, 2020

Feature Request

  • I’ve read and understood the Contributing guidelines and have done my best effort to follow them.
  • I’ve read and agree to the Code of Conduct.
  • I’ve searched for any related issues and avoided creating a duplicate issue.
  • 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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant