Skip to content
Snippets Groups Projects
Commit 895589a6 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

LoadingButton: allow setting the label via the main slot

More in line with native button elements
parent 0d52d551
Branches
No related tags found
No related merge requests found
Pipeline #14106 passed
......@@ -98,6 +98,7 @@ export class LoadingButton extends ScopedElementsMixin(LitElement) {
static get properties() {
return {
// value is deprecated, use the main slot instead
value: { type: String },
type: { type: String },
loading: { type: Boolean },
......@@ -155,7 +156,7 @@ export class LoadingButton extends ScopedElementsMixin(LitElement) {
render() {
return html`
<button class="button ${this.type} loading-container ${!this.loading ? "is-not-loading" : ""}" ?disabled="${this.disabled}">
<div class="label">${this.value}</div> <dbp-mini-spinner class="spinner" style="display: ${this.loading ? "inline" : "none"}"></dbp-mini-spinner>
<div class="label"><slot>${this.value}</slot></div> <dbp-mini-spinner class="spinner" style="display: ${this.loading ? "inline" : "none"}"></dbp-mini-spinner>
</button>
`;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment