1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Mark themeName prop as deprecated

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-02-01 15:01:57 +03:00
parent 5e4eb8e2b0
commit 310a2f14d9
2 changed files with 7 additions and 3 deletions

View File

@ -38,8 +38,8 @@ export type IconData = string | React.ReactNode | ((opt: IconDataFnArg) => React
export type InputProps = Omit<InputElementProps, "onChange" | "onSubmit"> & { export type InputProps = Omit<InputElementProps, "onChange" | "onSubmit"> & {
/** /**
* @deprecated * @deprecated
*/ */
theme?: "round-black" | "round"; theme?: "round-black" | "round";
lightTheme?: boolean; // Forced light theme, may be used for dialogs which is always "bright" lightTheme?: boolean; // Forced light theme, may be used for dialogs which is always "bright"
className?: string; className?: string;

View File

@ -29,6 +29,10 @@ export interface SelectOption<T = any> {
} }
export interface SelectProps<T = any> extends ReactSelectProps<T, boolean>, CreatableProps<T, boolean> { export interface SelectProps<T = any> extends ReactSelectProps<T, boolean>, CreatableProps<T, boolean> {
/**
* @deprecated
*/
themeName?: "dark" | "light" | "outlined" | "lens";
value?: T; value?: T;
lightTheme?: boolean; // Forced light theme, may be used for dialogs which is always "bright" lightTheme?: boolean; // Forced light theme, may be used for dialogs which is always "bright"
menuClass?: string; menuClass?: string;
@ -51,7 +55,7 @@ export class Select extends React.Component<SelectProps> {
} }
@computed get lightTheme() { @computed get lightTheme() {
return this.props.lightTheme || ThemeStore.getInstance().activeTheme.type == "light"; return this.props.lightTheme || this.props.themeName == "light" || ThemeStore.getInstance().activeTheme.type == "light";
} }
private styles: Styles<OptionTypeBase, boolean> = { private styles: Styles<OptionTypeBase, boolean> = {