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: relax RealTheme type for compatibility #329

Merged
merged 2 commits into from
Sep 7, 2022
Merged

Conversation

resure
Copy link
Contributor

@resure resure commented Sep 7, 2022

Current value of RealTheme type is not compatible with some existing code in services and related libraries. I think it would be better to keep it as string for now and move to a more narrow type in the next major release.

@resure resure marked this pull request as ready for review September 7, 2022 09:57
@yc-ui-bot
Copy link
Contributor

Preview is ready.

Comment on lines 1 to 4
export type RealTheme = string;
export type ThemeType = 'light' | 'dark';

export type Theme = 'system' | RealTheme;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export type RealTheme = string;
export type ThemeType = 'light' | 'dark';
export type Theme = 'system' | RealTheme;
export type RealTheme = 'light' | 'light-hc' | 'dark' | 'dark-hc';
export type ThemeType = 'light' | 'dark';
export type Theme = 'system' | RealTheme | string;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's not enough, problem is in RealTheme type itself

@resure resure requested a review from ValeraS September 7, 2022 11:48
@resure resure merged commit a716448 into main Sep 7, 2022
@resure resure deleted the relax-realtheme-type branch September 7, 2022 13:06
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.

4 participants