Doist / reactist

Open source React components made with ❤️ by Doist
http://doist.github.io/reactist
MIT License
247 stars 21 forks source link

feat: Add warning tone for Badge #826

Closed nats12 closed 2 months ago

nats12 commented 2 months ago

Short description

Adds a new warning variant for the Badge component's tone option.

Screenshot 2024-05-28 at 11 30 36

PR Checklist

Versioning

Minor

engfragui commented 2 months ago

@nats12 The code change looks sane to me 👌 The only thing I noticed is that the colors are the same for both light and dark mode versions, which I find unusual...

Screenshot 2024-05-29 at 10 21 00 Screenshot 2024-05-29 at 10 20 56

I'm assuming this new Badge tone has been requested by Design team? 🤔

nats12 commented 2 months ago

I'm assuming this new Badge tone has been requested by Design team? 🤔

@engfragui indeed, see convo here about the latest token style, and adding it to this component.

The only thing I noticed is that the colors are the same for both light and dark mode versions, which I find unusual...

I believe dark mode isn't supported for these components, so those aren't the actual dark mode styles that would be applied. That screenshot illustrates an example from the docs on how to style them differently. It seems most are inverted, with a slightly darker tint than in light mode, I'll do the same for warning:

Screenshot 2024-05-29 at 14 13 13

Thanks for raising! 🙌🏼