thumbprint icon indicating copy to clipboard operation
thumbprint copied to clipboard

Add support for basic text styling to `TextButton` and `Link`

Open webbower opened this issue 5 years ago • 0 comments

Currently, in order to make the text-only clickable components TextButton or Link bold (or any other allowable basic font styling) you have to add an extra nested span inside the component with the appropriate className prop (which may not be intuitive for some). I think it would be ok to add some props to these components to enable some basic formatting directly on the component. The one case I'm not sure about is how to handle responsive font-styling, but I've never seen it done so maybe that's a case where the nested span option can cover.

Requested options:

  • bold prop. Bolding these text-only clickable components is not uncommon in our codebase. I've done it a few times and I've reviewed CRs that do it too.
  • italic prop. I haven't used/seen this case, but maybe worth searching for usages. If it's not a use case, then I don't think it's worth implementing.

webbower avatar Jul 31 '19 18:07 webbower