dce-reactkit 3.7.37 → 3.7.38
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 +4 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +4 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Modal/index.tsx +49 -44
package/package.json
CHANGED
|
@@ -255,6 +255,9 @@ const Modal: React.FC<ModalProps> = (props) => {
|
|
|
255
255
|
onTopOfOtherModals,
|
|
256
256
|
} = props;
|
|
257
257
|
|
|
258
|
+
// Determine if no header either
|
|
259
|
+
const noHeader = (!title && type === ModalType.NoButtons);
|
|
260
|
+
|
|
258
261
|
/* -------------- State ------------- */
|
|
259
262
|
|
|
260
263
|
// True if animation is in use
|
|
@@ -457,59 +460,61 @@ const Modal: React.FC<ModalProps> = (props) => {
|
|
|
457
460
|
),
|
|
458
461
|
}}
|
|
459
462
|
>
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
color: (
|
|
464
|
-
isDarkModeOn()
|
|
465
|
-
? 'white'
|
|
466
|
-
: undefined
|
|
467
|
-
),
|
|
468
|
-
backgroundColor: (
|
|
469
|
-
isDarkModeOn()
|
|
470
|
-
? '#444'
|
|
471
|
-
: undefined
|
|
472
|
-
),
|
|
473
|
-
borderBottom: (
|
|
474
|
-
isDarkModeOn()
|
|
475
|
-
? '0.1rem solid gray'
|
|
476
|
-
: undefined
|
|
477
|
-
),
|
|
478
|
-
}}
|
|
479
|
-
>
|
|
480
|
-
<h5
|
|
481
|
-
className="modal-title"
|
|
463
|
+
{!noHeader && (
|
|
464
|
+
<div
|
|
465
|
+
className="modal-header"
|
|
482
466
|
style={{
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
467
|
+
color: (
|
|
468
|
+
isDarkModeOn()
|
|
469
|
+
? 'white'
|
|
470
|
+
: undefined
|
|
471
|
+
),
|
|
472
|
+
backgroundColor: (
|
|
473
|
+
isDarkModeOn()
|
|
474
|
+
? '#444'
|
|
475
|
+
: undefined
|
|
476
|
+
),
|
|
477
|
+
borderBottom: (
|
|
478
|
+
isDarkModeOn()
|
|
479
|
+
? '0.1rem solid gray'
|
|
487
480
|
: undefined
|
|
488
481
|
),
|
|
489
482
|
}}
|
|
490
483
|
>
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
{(onClose && !dontShowXButton) && (
|
|
495
|
-
<button
|
|
496
|
-
type="button"
|
|
497
|
-
className="Modal-x-button btn-close"
|
|
498
|
-
aria-label="Close"
|
|
484
|
+
<h5
|
|
485
|
+
className="modal-title"
|
|
499
486
|
style={{
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
487
|
+
fontWeight: 'bold',
|
|
488
|
+
fontSize: (
|
|
489
|
+
largeTitle
|
|
490
|
+
? '1.6rem'
|
|
503
491
|
: undefined
|
|
504
492
|
),
|
|
505
493
|
}}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
494
|
+
>
|
|
495
|
+
{title}
|
|
496
|
+
</h5>
|
|
497
|
+
|
|
498
|
+
{(onClose && !dontShowXButton) && (
|
|
499
|
+
<button
|
|
500
|
+
type="button"
|
|
501
|
+
className="Modal-x-button btn-close"
|
|
502
|
+
aria-label="Close"
|
|
503
|
+
style={{
|
|
504
|
+
backgroundColor: (
|
|
505
|
+
isDarkModeOn()
|
|
506
|
+
? 'white'
|
|
507
|
+
: undefined
|
|
508
|
+
),
|
|
509
|
+
}}
|
|
510
|
+
onClick={() => {
|
|
511
|
+
// Handle close
|
|
512
|
+
handleClose(ModalButtonType.Cancel);
|
|
513
|
+
}}
|
|
514
|
+
/>
|
|
515
|
+
)}
|
|
516
|
+
</div>
|
|
517
|
+
)}
|
|
513
518
|
{children && (
|
|
514
519
|
<div
|
|
515
520
|
className="modal-body"
|