thumbprint
thumbprint copied to clipboard
[@thumbtack/tp-ui-react-list]: Add `size` and `className` props from Type components
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).
Thought along these lines. We could take an approach similar to Segment: https://evergreen.segment.com/components/typography
-
Text
component would default tospan
instead ofp
. - We'd create a
P
component (and maybe others, similar to Segment?) -
List
andListItem
could also be part of this?
Migration:
- All existing instances of
Text
that don't useelementName
would get updated to useP
component. (SinceText
defaults to<p>
.)