chore: color schemes can be default theoretically (#1335)

This commit is contained in:
David Aaron Suddjian 2021-08-30 09:23:09 -07:00 committed by Yongjie Zhao
parent b9504ed713
commit 2b01890cad

View File

@ -3,6 +3,7 @@ export interface ColorSchemeConfig {
description?: string;
id: string;
label?: string;
isDefault?: boolean;
}
export default class ColorScheme {
@ -14,11 +15,13 @@ export default class ColorScheme {
label: string;
constructor(config: ColorSchemeConfig) {
const { colors, description = '', id, label } = config;
isDefault?: boolean;
constructor({ colors, description = '', id, label, isDefault }: ColorSchemeConfig) {
this.id = id;
this.label = label ?? id;
this.colors = colors;
this.description = description;
this.isDefault = isDefault;
}
}