Skip to content

Commit 45834e7

Browse files
committed
use animation css
1 parent cb8cffd commit 45834e7

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

packages/uui-menu-item/lib/uui-menu-item.element.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
237237
: this._renderLabelAsButton()}
238238
239239
<slot id="actions-container" name="actions"></slot>
240-
<uui-loader-bar
241-
id="loader"
242-
class=${this.loading ? 'visible' : ''}></uui-loader-bar>
240+
${this.loading
241+
? html`<uui-loader-bar id="loader"></uui-loader-bar>`
242+
: ''}
243243
</div>
244244
${this.showChildren ? html`<slot></slot>` : ''}
245245
`;
@@ -618,14 +618,15 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
618618
margin-right: var(--uui-size-base-unit);
619619
}
620620
621-
#loader {
622-
opacity: 0;
623-
transition: opacity 120ms ease-in 60ms;
624-
pointer-events: none;
621+
@keyframes fadeIn {
622+
100% {
623+
opacity: 1;
624+
}
625625
}
626626
627-
#loader.visible {
628-
opacity: 1;
627+
uui-loader-bar {
628+
opacity: 0;
629+
animation: fadeIn 120ms ease-in 60ms forwards;
629630
}
630631
`,
631632
];

0 commit comments

Comments
 (0)