simplified switcheroo application

This commit is contained in:
Jakob Pinterits
2024-05-03 11:22:41 +02:00
parent 683aa530eb
commit 30cebc16fd
5 changed files with 40 additions and 49 deletions

View File

@@ -1,4 +1,4 @@
import { applyColorSet, bumpThemeContext } from '../designApplication';
import { applyColorSet } from '../designApplication';
import { ColorSet } from '../dataModels';
import { ComponentBase, ComponentState } from './componentBase';
@@ -45,16 +45,9 @@ export class ProgressCircleComponent extends ComponentBase {
}
// Apply the color
if (deltaState.color === 'keep') {
bumpThemeContext(
this.element,
this.element.firstElementChild as HTMLElement
);
} else if (deltaState.color !== undefined) {
applyColorSet(
this.element.firstElementChild as HTMLElement,
deltaState.color
);
}
applyColorSet(
this.element.firstElementChild as HTMLElement,
deltaState.color === 'keep' ? 'bump' : deltaState.color
);
}
}