static: fix colours not changing on ActionButton

This commit is contained in:
Jens Langhammer 2020-11-22 22:10:55 +01:00
parent e0dbeca657
commit d5e34bb71d
3 changed files with 20 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -24,7 +24,23 @@ export class ActionButton extends LitElement {
isRunning = false;
static get styles() {
return [GlobalsStyle, ButtonStyle, SpinnerStyle, ColorStyles];
return [
GlobalsStyle,
ButtonStyle,
SpinnerStyle,
ColorStyles,
css`
button {
/* Have to use !important here, as buttons with pf-m-progress have transition already */
transition: all var(--pf-c-button--m-progress--TransitionDuration) ease 0s !important;
}
`,
];
}
constructor() {
super();
this.classList.add(PRIMARY_CLASS);
}
setLoading() {
@ -70,7 +86,7 @@ export class ActionButton extends LitElement {
render() {
return html`<button
class="pf-c-button pf-m-progress ${this.classList}"
class="pf-c-button pf-m-progress ${this.classList.toString()}"
@click=${() => this.callAction()}
>
${this.isRunning