diff --git a/packages/core/src/types/flow.ts b/packages/core/src/types/flow.ts index b7938b11..9e783bfc 100644 --- a/packages/core/src/types/flow.ts +++ b/packages/core/src/types/flow.ts @@ -39,7 +39,10 @@ export type Elements< EdgeEvents extends Record = any, > = Element[] -export type CustomThemeVars = Record +export interface CustomThemeVars { + [key: string]: string | number | undefined +} + export type CSSVars = | '--vf-node-color' | '--vf-box-shadow' @@ -47,6 +50,7 @@ export type CSSVars = | '--vf-node-text' | '--vf-connection-path' | '--vf-handle' + export type ThemeVars = { [key in CSSVars]?: CSSProperties['color'] } export type Styles = CSSProperties & ThemeVars & CustomThemeVars export type ClassFunc = (element: ElementType) => string | void