thumbprint icon indicating copy to clipboard operation
thumbprint copied to clipboard

[@thumbtack/tp-ui-react-list]: Add `size` and `className` props from Type components

Open webbower opened this issue 6 years ago • 1 comments

Because List and ListItem are text-centric components (even though ul/ol/li can be used for other things), they should probably support type-related props used on the Text and Title components.

Add support for the size prop to both List and ListItem that maps to the size classes applied to the Text component and add support for className to both List and ListItem components to support margin, padding, and text styling variations (bold, alignment, etc).

webbower avatar Dec 18 '18 19:12 webbower

Thought along these lines. We could take an approach similar to Segment: https://evergreen.segment.com/components/typography

  • Text component would default to span instead of p.
  • We'd create a P component (and maybe others, similar to Segment?)
  • List and ListItem could also be part of this?

Migration:

  • All existing instances of Text that don't use elementName would get updated to use P component. (Since Text defaults to <p>.)

danoc avatar Jan 16 '19 21:01 danoc