@loja-integrada/admin-components 0.15.4 → 0.15.5

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.
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare const Modal: React.MemoExoticComponent<({ className, isOpen, preventClose, size, headerTitle, headerClose, footerActions, onClose, parentSelector, children, }: ModalProps) => JSX.Element>;
2
+ export declare const Modal: React.MemoExoticComponent<({ className, isOpen, preventClose, size, headerTitle, headerClose, footerActions, onClose, closeTimeout, parentSelector, children, }: ModalProps) => JSX.Element>;
3
3
  export interface ModalProps {
4
4
  /**
5
5
  * Custom class name
@@ -29,6 +29,10 @@ export interface ModalProps {
29
29
  * Call when modal is closed
30
30
  * */
31
31
  onClose?: Function;
32
+ /**
33
+ * Number indicating the milliseconds to wait before closing the modal
34
+ * */
35
+ closeTimeout?: number;
32
36
  /**
33
37
  * React children
34
38
  */
@@ -2410,6 +2410,8 @@ var ModalComponent = function ModalComponent(_ref) {
2410
2410
  headerClose = _ref$headerClose === void 0 ? 'Fechar' : _ref$headerClose,
2411
2411
  footerActions = _ref.footerActions,
2412
2412
  onClose = _ref.onClose,
2413
+ _ref$closeTimeout = _ref.closeTimeout,
2414
+ closeTimeout = _ref$closeTimeout === void 0 ? 200 : _ref$closeTimeout,
2413
2415
  _parentSelector = _ref.parentSelector,
2414
2416
  children = _ref.children;
2415
2417
 
@@ -2438,7 +2440,7 @@ var ModalComponent = function ModalComponent(_ref) {
2438
2440
  isOpen: modalIsOpen,
2439
2441
  onAfterClose: handleAfterCloseFunc,
2440
2442
  onRequestClose: handleRequestCloseFunc,
2441
- closeTimeoutMS: 200,
2443
+ closeTimeoutMS: closeTimeout,
2442
2444
  ariaHideApp: false,
2443
2445
  shouldCloseOnOverlayClick: !modalPreventClose,
2444
2446
  shouldCloseOnEsc: !modalPreventClose,