gd-bs 6.5.3 → 6.5.4
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.
- package/build/components/card/item.js +15 -7
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/components/card/item.ts +17 -8
|
@@ -32,7 +32,7 @@ var CardBody = /** @class */ (function () {
|
|
|
32
32
|
// Update the title
|
|
33
33
|
var elTitle = this._el.querySelector(".card-title");
|
|
34
34
|
if (this._props.title || this._props.onRenderTitle) {
|
|
35
|
-
// Append the
|
|
35
|
+
// Append the title
|
|
36
36
|
(0, common_1.appendContent)(elTitle, this._props.title);
|
|
37
37
|
// Call the render event
|
|
38
38
|
this._props.onRenderTitle ? this._props.onRenderTitle(elTitle, this._props) : null;
|
|
@@ -44,25 +44,33 @@ var CardBody = /** @class */ (function () {
|
|
|
44
44
|
// Update the sub-title
|
|
45
45
|
var subTitle = this._el.querySelector(".card-subtitle");
|
|
46
46
|
if (this._props.subTitle) {
|
|
47
|
-
// Set the title
|
|
47
|
+
// Set the sub-title
|
|
48
48
|
subTitle.innerHTML = this._props.subTitle;
|
|
49
49
|
}
|
|
50
50
|
else {
|
|
51
|
-
// Remove the title
|
|
51
|
+
// Remove the sub-title
|
|
52
52
|
this._el.removeChild(subTitle);
|
|
53
53
|
}
|
|
54
54
|
// Update the text
|
|
55
55
|
var text = this._el.querySelector(".card-text");
|
|
56
56
|
if (this._props.text) {
|
|
57
|
-
// Set the
|
|
57
|
+
// Set the text
|
|
58
58
|
text.innerHTML = this._props.text;
|
|
59
59
|
}
|
|
60
|
+
// Else, see if there is content
|
|
61
|
+
else if (this._props.content && typeof (this._props.content) === "string") {
|
|
62
|
+
// Set the text
|
|
63
|
+
text.innerHTML = this._props.content;
|
|
64
|
+
}
|
|
60
65
|
else {
|
|
61
|
-
// Remove the
|
|
66
|
+
// Remove the text
|
|
62
67
|
this._el.removeChild(text);
|
|
63
68
|
}
|
|
64
|
-
//
|
|
65
|
-
|
|
69
|
+
// See if the content is an element
|
|
70
|
+
if (this._props.content && typeof (this._props.content) !== "string") {
|
|
71
|
+
// Append the content
|
|
72
|
+
(0, common_1.appendContent)(this._el, this._props.content);
|
|
73
|
+
}
|
|
66
74
|
// Render the actions
|
|
67
75
|
this.renderActions();
|
|
68
76
|
};
|