Skip to content

Commit

Permalink
Update style modifier for new structure
Browse files Browse the repository at this point in the history
  • Loading branch information
wenincode authored and chris-hut committed Oct 16, 2023
1 parent 0519b9b commit 50cbd00
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions ui/packages/consul-ui/app/modifiers/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,17 @@ export default class StyleModifier extends Modifier {
this._oldStyles = new Set(newStyles.map((e) => e[0]));
}

didReceiveArguments() {
if (typeof this.args.named.delay !== 'undefined') {
modify(element, positional, named) {
this.element = element;

if (typeof named.delay !== 'undefined') {
setTimeout((_) => {
if (typeof this !== this.args.positional[0]) {
this.setStyles(this.args.positional[0]);
if (typeof this !== positional[0]) {
this.setStyles(positional[0]);
}
}, this.args.named.delay);
}, named?.delay);
} else {
this.setStyles(this.args.positional[0]);
this.setStyles(positional[0]);
}
}
}

0 comments on commit 50cbd00

Please sign in to comment.