@salla.sa/twilight-components 1.0.55 → 1.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -109,16 +109,8 @@ const SallaButton = class {
|
|
|
109
109
|
+ (this.buttonType == 'icon' ? ' s-button-loader-center' : ' s-button-loader-' + this.loaderPosition);
|
|
110
110
|
return this.hostAttributes;
|
|
111
111
|
}
|
|
112
|
-
// @Watch('btnStyle')
|
|
113
|
-
// handleVisible(newKind: string, oldKind: string) {
|
|
114
|
-
// //todo::use united styles
|
|
115
|
-
// this.btn.classList.remove('btn-' + oldKind);
|
|
116
|
-
// this.btn.classList.add('btn-' + newKind);
|
|
117
|
-
// }
|
|
118
112
|
render() {
|
|
119
|
-
return (
|
|
120
|
-
//TODO:: use HOST then fake button behaviours
|
|
121
|
-
index.h(index.Host, { class: "s-button-wrap" }, index.h("button", Object.assign({}, this.getBtnAttributes(), { disabled: this.disabled }), index.h("span", { class: "s-button-text", ref: el => this.text = el }, index.h("slot", null)), this.loading ? index.h("span", { class: "s-button-loader" }) : '')));
|
|
113
|
+
return (index.h(index.Host, { class: "s-button-wrap" }, index.h("button", Object.assign({}, this.getBtnAttributes(), { disabled: this.disabled }), index.h("span", { class: "s-button-text", ref: el => this.text = el }, index.h("slot", null)), this.loading ? index.h("span", { class: "s-button-loader" }) : '')));
|
|
122
114
|
}
|
|
123
115
|
get host() { return index.getElement(this); }
|
|
124
116
|
};
|
|
@@ -101,16 +101,8 @@ export class SallaButton {
|
|
|
101
101
|
+ (this.buttonType == 'icon' ? ' s-button-loader-center' : ' s-button-loader-' + this.loaderPosition);
|
|
102
102
|
return this.hostAttributes;
|
|
103
103
|
}
|
|
104
|
-
// @Watch('btnStyle')
|
|
105
|
-
// handleVisible(newKind: string, oldKind: string) {
|
|
106
|
-
// //todo::use united styles
|
|
107
|
-
// this.btn.classList.remove('btn-' + oldKind);
|
|
108
|
-
// this.btn.classList.add('btn-' + newKind);
|
|
109
|
-
// }
|
|
110
104
|
render() {
|
|
111
|
-
return (
|
|
112
|
-
//TODO:: use HOST then fake button behaviours
|
|
113
|
-
h(Host, { class: "s-button-wrap" },
|
|
105
|
+
return (h(Host, { class: "s-button-wrap" },
|
|
114
106
|
h("button", Object.assign({}, this.getBtnAttributes(), { disabled: this.disabled }),
|
|
115
107
|
h("span", { class: "s-button-text", ref: el => this.text = el },
|
|
116
108
|
h("slot", null)),
|
|
@@ -105,16 +105,8 @@ const SallaButton = class {
|
|
|
105
105
|
+ (this.buttonType == 'icon' ? ' s-button-loader-center' : ' s-button-loader-' + this.loaderPosition);
|
|
106
106
|
return this.hostAttributes;
|
|
107
107
|
}
|
|
108
|
-
// @Watch('btnStyle')
|
|
109
|
-
// handleVisible(newKind: string, oldKind: string) {
|
|
110
|
-
// //todo::use united styles
|
|
111
|
-
// this.btn.classList.remove('btn-' + oldKind);
|
|
112
|
-
// this.btn.classList.add('btn-' + newKind);
|
|
113
|
-
// }
|
|
114
108
|
render() {
|
|
115
|
-
return (
|
|
116
|
-
//TODO:: use HOST then fake button behaviours
|
|
117
|
-
h(Host, { class: "s-button-wrap" }, h("button", Object.assign({}, this.getBtnAttributes(), { disabled: this.disabled }), h("span", { class: "s-button-text", ref: el => this.text = el }, h("slot", null)), this.loading ? h("span", { class: "s-button-loader" }) : '')));
|
|
109
|
+
return (h(Host, { class: "s-button-wrap" }, h("button", Object.assign({}, this.getBtnAttributes(), { disabled: this.disabled }), h("span", { class: "s-button-text", ref: el => this.text = el }, h("slot", null)), this.loading ? h("span", { class: "s-button-loader" }) : '')));
|
|
118
110
|
}
|
|
119
111
|
get host() { return getElement(this); }
|
|
120
112
|
};
|