Skip to content

Override toString on our design token color #1960

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

Merged
merged 2 commits into from
Apr 10, 2022

Conversation

ethanshar
Copy link
Collaborator

@ethanshar ethanshar commented Apr 10, 2022

Description

I override the design token platform colors toString method to return the original string hex value.
This way I can use it in the various color utils methods we have
What's nice about it that a string variable always returns its string value when calling toString

So for example if we call Colors.getColorTint with either a string or platfrom color object, we can call their toString to get the string hex value

Changelog

Fix how we handle platfrom color strings values

@ethanshar ethanshar requested a review from lidord-wix April 10, 2022 15:16
@ethanshar ethanshar changed the title Override toString on our design token color to expose its original he… Override toString on our design token color Apr 10, 2022
@lidord-wix lidord-wix enabled auto-merge (squash) April 10, 2022 15:19
@lidord-wix lidord-wix merged commit 428af31 into master Apr 10, 2022
@ethanshar ethanshar deleted the feat/platformColor_toString branch June 13, 2022 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants