segmentio / evergreen

🌲 Evergreen React UI Framework by Segment
https://evergreen.segment.com
MIT License
12.38k stars 830 forks source link

Chore: Remove tinycolor2 #1592

Closed brandongregoryscott closed 1 year ago

brandongregoryscott commented 1 year ago

After removing the classic/deprecated default themes in the v7 branch, I noticed we're only using tinycolor2 in one place: the Badge component theme. https://github.com/segmentio/evergreen/blob/master/src/themes/default/components/badge.js#L19

After running this code in the console, it looks like isLight returns true for yellow and orange, however - I don't think this fallback object is ever really hit. Let's verify that we prevent users from passing arbitrary colors (i.e. anything other than the keys of fills.colors) and remove this dependency/unnecessary code.

Himu1503 commented 1 year ago

Hi @brandongregoryscott Can you assign me this issue, this is my first open source contribution, would love to work on it. Thanks.

brandongregoryscott commented 1 year ago

@Himu1503 We don't assign issues to non-Segment contributors, but contributions are always welcome. Take a look at our contributing guidelines and open up a PR when your work is ready!