Skip to content

Commit

Permalink
feat(project): add nullable as values for colors
Browse files Browse the repository at this point in the history
  • Loading branch information
RCVZ committed May 6, 2021
1 parent 13d81f0 commit 9a3cc67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/services/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const menuSchema: SchemaOf<Menu> = object().shape({
});

const optionsSchema: SchemaOf<Options> = object({
backgroundColor: string().notRequired(),
highlightColor: string().notRequired(),
backgroundColor: string().nullable(),
highlightColor: string().nullable(),
enableContinueWatching: boolean().notRequired(),
headerBackground: string().notRequired(),
enableCasting: boolean().notRequired(),
Expand Down Expand Up @@ -86,6 +86,7 @@ const serializeDeprecatedConfig = (config: Config) => {
analyticsToken: description.analyticsToken,
options: {
dynamicBlur: description.dynamicBlur,
...config.options,
},
};
console.info(newConfig);
Expand Down
4 changes: 2 additions & 2 deletions types/Config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export type Menu = {
};

export type Options = {
backgroundColor?: string;
highlightColor?: string;
backgroundColor?: string | null;
highlightColor?: string | null;
enableContinueWatching?: boolean;
headerBackground?: string;
enableCasting?: boolean;
Expand Down

0 comments on commit 9a3cc67

Please sign in to comment.