Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: typography component updates #497

Merged
merged 5 commits into from
Nov 27, 2024
Merged

fix: typography component updates #497

merged 5 commits into from
Nov 27, 2024

Conversation

tibuurcio
Copy link
Collaborator

@tibuurcio tibuurcio commented Nov 19, 2024

Summary

This PR updates the Typography components to better reflect our current customization needs coming from the platforms. It does the following:

  • Changes the size prop to generically accept numbers rather then only 'base' | 'sm' | 'lg' | 'xl'
  • Makes the color prop work (it wasn't) and provide some auto-complete suggestions for it based on ColorText design tokens.
  • Adds a new tooltip prop to both Typography.Text and Typography.Link to be used when those components are used inside a tooltip. Also adds a story for it.
  • Re-organize all Typography component related stories, essentially moving individual prop stories into the main one and making them toggleable through controls.

Testing Plan

  • Was this tested locally?
  • [] Test in the platforms

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

Copy link

github-actions bot commented Nov 19, 2024

PR Preview Action v1.4.8
Preview removed because the pull request was closed.
2024-11-27 17:59 UTC

Comment on lines +19 to +20
if (size === 'xl') return 20
return size
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIce!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if we need xs = 10px 🤔

@tibuurcio
Copy link
Collaborator Author

I'll be waiting on Design review for this one

## [1.35.1-fix-typography.1](v1.35.0...v1.35.1-fix-typography.1) (2024-11-20)

### Bug Fixes

* typography updates ([f1c7d63](f1c7d63))
children: 'Example Text',
type: undefined,
color: undefined,
size: 'base',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hooray! 🎉

}

export const Typography = () => {
return <>DO NOT USE</>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...or you'll be fired 😝

Copy link
Collaborator

@nastyastavitskaya nastyastavitskaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is an incredible improvement! 👏

@tibuurcio tibuurcio merged commit d32d390 into main Nov 27, 2024
9 checks passed
mparticle-automation added a commit that referenced this pull request Nov 28, 2024
# [1.36.0](v1.35.0...v1.36.0) (2024-11-28)

### Bug Fixes

* typography component updates ([#497](#497)) ([d32d390](d32d390))

### Features

* add abSplit icon ([#499](#499)) ([8776f1c](8776f1c))
* add notificationSubscriptions icon ([#505](#505)) ([b4976bc](b4976bc))
* utilize generics in UserPreferencesService  ([#504](#504)) ([4838a86](4838a86))
@mparticle-automation
Copy link
Collaborator

🎉 This PR is included in version 1.36.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants