From 310a2f14d92e958804ed3a45727a947d1c4a40f1 Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Tue, 1 Feb 2022 15:01:57 +0300 Subject: [PATCH] Mark themeName prop as deprecated Signed-off-by: Alex Andreev --- src/renderer/components/input/input.tsx | 4 ++-- src/renderer/components/select/select.tsx | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/input/input.tsx b/src/renderer/components/input/input.tsx index 4248305080..6b9c19521b 100644 --- a/src/renderer/components/input/input.tsx +++ b/src/renderer/components/input/input.tsx @@ -38,8 +38,8 @@ export type IconData = string | React.ReactNode | ((opt: IconDataFnArg) => React export type InputProps = Omit & { /** - * @deprecated - */ + * @deprecated + */ theme?: "round-black" | "round"; lightTheme?: boolean; // Forced light theme, may be used for dialogs which is always "bright" className?: string; diff --git a/src/renderer/components/select/select.tsx b/src/renderer/components/select/select.tsx index 50248bbefb..d60e868ab7 100644 --- a/src/renderer/components/select/select.tsx +++ b/src/renderer/components/select/select.tsx @@ -29,6 +29,10 @@ export interface SelectOption { } export interface SelectProps extends ReactSelectProps, CreatableProps { + /** + * @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 { } @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 = {