wethegit / component-library

WTC's internal React component library.
https://wethegit.github.io/component-library/
MIT License
0 stars 0 forks source link

[COMP] Typography and `<Text>` improvements #185

Closed andrewrubin closed 5 months ago

andrewrubin commented 5 months ago

Description

This PR adds the following:

Does this close any open issues?

Closes #153 Closes #162 Closes #180

Notes

Screenshots

Here's the breakpoint alignment in action: https://github.com/wethegit/component-library/assets/30575213/96158a5a-2645-4587-9bc5-a281050d238a

Here's the new wrap prop https://github.com/wethegit/component-library/assets/30575213/fcb974d5-df7a-49d4-9658-bab31e0e2200

changeset-bot[bot] commented 5 months ago

⚠️ No Changeset found

Latest commit: 0764fffbaad6c61caaf1e7a8f00494da05c79741

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

andrewrubin commented 5 months ago

Added the wrapping option per #180 as well. Here's a screengrab of that in action (the prop is wrap, I recorded the video before I renamed it).

In order to avoid an extra CSS class, I default the .text class to use text-wrap: pretty, as it's likely to be most commonly used. You can override that via wrap="wrap", wrap="balance", wrap="nowrap", etc.

https://github.com/wethegit/component-library/assets/30575213/fcb974d5-df7a-49d4-9658-bab31e0e2200