Skip to content

Changing components strings label props types to node type #1961

@pandaiolo

Description

@pandaiolo

This issue refers #1950 PR, that changed the prop type of card header title and subtitle to node intead of string to enable non-text values such as Links, Icons, etc.

Following the discussion on that PR, it seems that other components could also benefit from this change.

I am opening this issue to make an inventory of the places where it needs to be changed, so that I can make a PR with the related changes :

  • CardTitle title and subtitle
  • Tab label
  • GridTile title
  • Checkbox label , example: <span>Check that box to accept our <Link>TOS</Link></span>

Not sure :

  • DatePicker and TextField hintText and floatingLabelText
  • List subHeader
  • Snackbar action, message : would non-string content here break the Material Design specs ?
  • TableHeader tooltip

Misc notes :

  • Buttons label prop should stay string because nodes can be specified as children of the component to be used as the button label. Although the question of API consistency between components can be raised. (should all labels be node typed?)

So, what should be changed ? Thanks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: new featureExpand the scope of the product to solve a new problem.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions