Add WIP video style preview dialog (#115)

Co-authored-by: Victor <victor@storyteller.ai>
This commit is contained in:
Danny McGee
2024-03-29 22:33:44 -04:00
committed by GitHub
parent 3dba6cb284
commit fbc914fd7b
19 changed files with 677 additions and 153 deletions
+13 -2
View File
@@ -16,16 +16,27 @@ export class ButtonElement extends LitElement {
@property() icon?: string;
@property({ type: Boolean }) disabled = false;
@property({ type: Boolean })
primary?: boolean;
override tabIndex = 0;
protected override willUpdate(changes: PropertyValues<this>): void {
protected override update(changes: PropertyValues<this>): void {
if (changes.has("disabled")) {
this.ariaDisabled = this.disabled ? "true" : null;
this.tabIndex = this.disabled ? -1 : 0;
this.classList.toggle("disabled", this.disabled);
}
super.willUpdate(changes);
if (changes.has("primary")) {
if (this.primary) {
this.style.setProperty("--background-color", "var(--color-accent)");
} else {
this.style.removeProperty("--background-color");
}
}
super.update(changes);
}
@on("keydown")