Skip to content

getTintColor support options, should reverse on dark prop #2321

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 4 commits into from
Nov 21, 2022

Conversation

adids1221
Copy link
Contributor

Description

getTintColor support options object with should reverse on dark prop.

Changelog

getTintColor support options object with should reverse on dark prop for the new Loader logic - Theme preset.

@adids1221 adids1221 requested a review from ethanshar November 10, 2022 09:05
@@ -162,7 +163,8 @@ export class Colors {
return validColors ? undefined : results[0];
}

getColorTint(colorValue: string | OpaqueColorValue, tintKey: string | number) {
getColorTint(colorValue: string | OpaqueColorValue, tintKey: string | number, options?: GetColorTintOptions) {
const avoidReverseOnDark = !!options?.shouldReverseOnDark;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you misunderstood me here..
What I meant is that the option name will be avoidReverseOnDark, this way you don't need to do any special manipulation, and if the user passes nothing it will behave as we meant to

@adids1221 adids1221 requested a review from ethanshar November 16, 2022 09:43
@ethanshar ethanshar merged commit e8ff69d into master Nov 21, 2022
@adids1221 adids1221 deleted the feat/getTintColor_options branch December 13, 2022 12:13
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