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

Update label prop type in AUradio and AUcheckbox #899

Open
@kolking

Description

@kolking

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions