From 2446d51861ad821d59ec1c9c292e6fb436d517ea Mon Sep 17 00:00:00 2001 From: Filipe Merker Date: Thu, 9 Jun 2022 17:57:57 -0300 Subject: [PATCH] feat: add types for customThemes --- packages/base-types/src/models/project/index.ts | 4 +++- packages/base-types/src/models/project/theme.ts | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 packages/base-types/src/models/project/theme.ts diff --git a/packages/base-types/src/models/project/index.ts b/packages/base-types/src/models/project/index.ts index e76009326..eece49175 100644 --- a/packages/base-types/src/models/project/index.ts +++ b/packages/base-types/src/models/project/index.ts @@ -2,9 +2,11 @@ import { AnyRecord } from '@voiceflow/common'; import { Member } from './member'; import { Prototype } from './prototype'; +import { Themes } from './theme'; export * from './member'; export * from './prototype'; +export * from './theme'; export enum LinkType { CURVED = 'CURVED', @@ -20,7 +22,6 @@ export interface ReportTag { tagID: string; label: string; } - export interface Model { _id: string; teamID: string; @@ -37,6 +38,7 @@ export interface Model; + customThemes: Themes; members: Member[]; platformData: PlatformData; diff --git a/packages/base-types/src/models/project/theme.ts b/packages/base-types/src/models/project/theme.ts new file mode 100644 index 000000000..3801a96e3 --- /dev/null +++ b/packages/base-types/src/models/project/theme.ts @@ -0,0 +1,11 @@ +type Shades = { + [key in '50' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900']: string; +}; + +export interface Theme { + palette: Shades; + standardColor: string; + name?: string; +} + +export type Themes = Array;