dce-reactkit 3.0.0-beta.21 → 3.0.0-beta.22
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/dist/cjs/index.js +2 -2
- package/dist/esm/index.js +2 -2
- package/package.json +1 -1
- package/src/components/Modal.tsx +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -192,7 +192,7 @@ var ModalSize$1 = ModalSize;
|
|
|
192
192
|
/* Constants */
|
|
193
193
|
/*------------------------------------------------------------------------*/
|
|
194
194
|
// Constants
|
|
195
|
-
const MS_TO_ANIMATE =
|
|
195
|
+
const MS_TO_ANIMATE = 200; // Animation duration
|
|
196
196
|
// Modal type to list of buttons
|
|
197
197
|
const modalTypeToModalButtonTypes = {
|
|
198
198
|
[ModalType$1.Okay]: [
|
|
@@ -472,7 +472,7 @@ const Modal = (props) => {
|
|
|
472
472
|
// Check if this button is last
|
|
473
473
|
const last = (i === ModalButtonTypes.length - 1);
|
|
474
474
|
// Create the button
|
|
475
|
-
return (React__default["default"].createElement("button", { type: "button", className: `Modal-${ModalButtonType}-button btn btn-${variant} ${last ? '' : '
|
|
475
|
+
return (React__default["default"].createElement("button", { type: "button", className: `Modal-${ModalButtonType}-button btn btn-${variant} ${last ? '' : 'me-1'}`, onClick: () => {
|
|
476
476
|
handleClose(ModalButtonType);
|
|
477
477
|
} }, label));
|
|
478
478
|
});
|
package/dist/esm/index.js
CHANGED
|
@@ -184,7 +184,7 @@ var ModalSize$1 = ModalSize;
|
|
|
184
184
|
/* Constants */
|
|
185
185
|
/*------------------------------------------------------------------------*/
|
|
186
186
|
// Constants
|
|
187
|
-
const MS_TO_ANIMATE =
|
|
187
|
+
const MS_TO_ANIMATE = 200; // Animation duration
|
|
188
188
|
// Modal type to list of buttons
|
|
189
189
|
const modalTypeToModalButtonTypes = {
|
|
190
190
|
[ModalType$1.Okay]: [
|
|
@@ -464,7 +464,7 @@ const Modal = (props) => {
|
|
|
464
464
|
// Check if this button is last
|
|
465
465
|
const last = (i === ModalButtonTypes.length - 1);
|
|
466
466
|
// Create the button
|
|
467
|
-
return (React.createElement("button", { type: "button", className: `Modal-${ModalButtonType}-button btn btn-${variant} ${last ? '' : '
|
|
467
|
+
return (React.createElement("button", { type: "button", className: `Modal-${ModalButtonType}-button btn btn-${variant} ${last ? '' : 'me-1'}`, onClick: () => {
|
|
468
468
|
handleClose(ModalButtonType);
|
|
469
469
|
} }, label));
|
|
470
470
|
});
|
package/package.json
CHANGED
package/src/components/Modal.tsx
CHANGED
|
@@ -20,7 +20,7 @@ import ModalType from '../types/ModalType';
|
|
|
20
20
|
/*------------------------------------------------------------------------*/
|
|
21
21
|
|
|
22
22
|
// Constants
|
|
23
|
-
const MS_TO_ANIMATE =
|
|
23
|
+
const MS_TO_ANIMATE = 200; // Animation duration
|
|
24
24
|
|
|
25
25
|
// Modal type to list of buttons
|
|
26
26
|
const modalTypeToModalButtonTypes: {
|
|
@@ -407,7 +407,7 @@ const Modal: React.FC<Props> = (props) => {
|
|
|
407
407
|
return (
|
|
408
408
|
<button
|
|
409
409
|
type="button"
|
|
410
|
-
className={`Modal-${ModalButtonType}-button btn btn-${variant} ${last ? '' : '
|
|
410
|
+
className={`Modal-${ModalButtonType}-button btn btn-${variant} ${last ? '' : 'me-1'}`}
|
|
411
411
|
onClick={() => {
|
|
412
412
|
handleClose(ModalButtonType);
|
|
413
413
|
}}
|