Mark themeName prop as deprecated

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

No files matched your search

+2 -2
View File
@@ -38,8 +38,8 @@ export type IconData = string | React.ReactNode | ((opt: IconDataFnArg) => React
export type InputProps = Omit<InputElementProps, "onChange" | "onSubmit"> & {
/**
* @deprecated
*/
* @deprecated
*/
theme?: "round-black" | "round";
lightTheme?: boolean; // Forced light theme, may be used for dialogs which is always "bright"
className?: string;
+5 -1
View File
@@ -29,6 +29,10 @@ export interface SelectOption<T = any> {
}
export interface SelectProps<T = any> extends ReactSelectProps<T, boolean>, CreatableProps<T, boolean> {
/**
* @deprecated
*/
themeName?: "dark" | "light" | "outlined" | "lens";
value?: T;
lightTheme?: boolean; // Forced light theme, may be used for dialogs which is always "bright"
menuClass?: string;
@@ -51,7 +55,7 @@ export class Select extends React.Component<SelectProps> {
}
@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> = {