gd-bs 5.3.0 → 5.3.1
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/.github/workflows/build.yml +7 -4
- package/build/components/modal/index.js +17 -1
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +3 -0
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/components/modal/index.ts +17 -1
- package/src/components/modal/types.d.ts +3 -0
package/package.json
CHANGED
|
@@ -78,7 +78,7 @@ class _Modal extends Base<IModalProps> implements IModal {
|
|
|
78
78
|
if (this.props.hideCloseButton) {
|
|
79
79
|
// Remove the close button
|
|
80
80
|
let closeButton = dialog.querySelector(".btn-close") as HTMLElement;
|
|
81
|
-
closeButton ? closeButton.
|
|
81
|
+
closeButton ? closeButton.classList.add("d-none") : null;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -234,6 +234,22 @@ class _Modal extends Base<IModalProps> implements IModal {
|
|
|
234
234
|
this.el.setAttribute("data-bs-backdrop", value ? "true" : "false");
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
+
// Updates the visibility of the close button
|
|
238
|
+
setCloseButtonVisibility(showFl: boolean) {
|
|
239
|
+
// Get the close button
|
|
240
|
+
let closeButton = this.el.querySelector(".btn-close") as HTMLElement;
|
|
241
|
+
if (closeButton) {
|
|
242
|
+
// See if we are showing the button
|
|
243
|
+
if (showFl) {
|
|
244
|
+
// Show the button
|
|
245
|
+
closeButton.classList.remove("d-none");
|
|
246
|
+
} else {
|
|
247
|
+
// Hide the button
|
|
248
|
+
closeButton.classList.add("d-none");
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
237
253
|
// Updates the focus flag
|
|
238
254
|
setFocus(value: boolean) {
|
|
239
255
|
// Set the focus
|
|
@@ -92,6 +92,9 @@ export interface IModal {
|
|
|
92
92
|
/** Updates the backdrop flag. */
|
|
93
93
|
setBackdrop: (value: boolean) => void;
|
|
94
94
|
|
|
95
|
+
/** Updates the visibility of the close button. */
|
|
96
|
+
setCloseButtonVisibility: (showFl: boolean) => void;
|
|
97
|
+
|
|
95
98
|
/** Updates the focus flag. */
|
|
96
99
|
setFocus: (value: boolean) => void;
|
|
97
100
|
|