Skip to content

Commit

Permalink
feat: add types for customThemes
Browse files Browse the repository at this point in the history
  • Loading branch information
filipemerker committed Jun 9, 2022
1 parent 1a3db4c commit 2446d51
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/base-types/src/models/project/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -20,7 +22,6 @@ export interface ReportTag {
tagID: string;
label: string;
}

export interface Model<PlatformData extends AnyRecord, MemberPlatformData extends AnyRecord> {
_id: string;
teamID: string;
Expand All @@ -37,6 +38,7 @@ export interface Model<PlatformData extends AnyRecord, MemberPlatformData extend
linkType?: LinkType;
prototype?: Prototype;
reportTags?: Record<string, ReportTag>;
customThemes: Themes;

members: Member<MemberPlatformData>[];
platformData: PlatformData;
Expand Down
11 changes: 11 additions & 0 deletions packages/base-types/src/models/project/theme.ts
Original file line number Diff line number Diff line change
@@ -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<Theme>;

0 comments on commit 2446d51

Please sign in to comment.