From 9a7ec15f07e3fa01efd1ec942f8a3ec50450162a Mon Sep 17 00:00:00 2001 From: Wroud Date: Thu, 1 Oct 2020 17:51:55 +0300 Subject: [PATCH] chore(core-theming): add DynamicStyle type --- webapp/packages/core-theming/src/useStyles.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webapp/packages/core-theming/src/useStyles.ts b/webapp/packages/core-theming/src/useStyles.ts index 4586e0ffad..9fa9cf21b0 100644 --- a/webapp/packages/core-theming/src/useStyles.ts +++ b/webapp/packages/core-theming/src/useStyles.ts @@ -19,6 +19,7 @@ import { applyComposes, ClassCollection, Composes } from './themeUtils'; export type BaseStyles = ClassCollection | Composes export type ThemeSelector = (theme: string) => Promise export type Style = BaseStyles | ThemeSelector +export type DynamicStyle = Style | boolean | undefined; /** * Changes styles depending on theme @@ -26,14 +27,14 @@ export type Style = BaseStyles | ThemeSelector * @param componentStyles styles array */ export function useStyles( - ...componentStyles: Array