Skip to content

Commit

Permalink
feat(FEC-13630): expose tone ramp in user theme (#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
lianbenjamin committed Feb 6, 2024
1 parent bdb66c0 commit a58092d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/colors-override.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ const config = {
colors: {
primary: '#da3633',
live: '#ffff00',
playerBackground: '#ffa500'
playerBackground: '#ffa500',
tone1: '#ffffff',
paperSurface: '#f5f5f5'
}
}
}
Expand Down
13 changes: 13 additions & 0 deletions src/types/user-theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,20 @@ export type ColorType = {
danger: string;
warning: string;
live: string;
// surface colors
playerBackground: string;
paperSurface: string;
elevatedSurface: string;
protectionSurface: string;
// tone ramp colors
tone1: string;
tone2: string;
tone3: string;
tone4: string;
tone5: string;
tone6: string;
tone7: string;
tone8: string;
};

export type UserTheme = {
Expand Down
13 changes: 11 additions & 2 deletions src/utils/themes-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,17 @@ const cssVarNames = {
colors: {
live: '--playkit-live-color',
playerBackground: '--playkit-player-background-color',
paper: '--playkit-paper-color',
tone1: '--playkit-tone-1-color'
paperSurface: '--playkit-paper-color',
elevatedSurface: '--playkit-elevated-color',
protectionSurface: '--playkit-protection-color',
tone1: '--playkit-tone-1-color',
tone2: '--playkit-tone-2-color',
tone3: '--playkit-tone-3-color',
tone4: '--playkit-tone-4-color',
tone5: '--playkit-tone-5-color',
tone6: '--playkit-tone-6-color',
tone7: '--playkit-tone-7-color',
tone8: '--playkit-tone-8-color'
}
};

Expand Down

0 comments on commit a58092d

Please sign in to comment.