venice-ui 1.0.54 → 1.0.56
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.
|
@@ -12,7 +12,7 @@ const Button_1 = require("../Button");
|
|
|
12
12
|
const common_1 = require("../common");
|
|
13
13
|
const Modal_styles_1 = require("./Modal.styles");
|
|
14
14
|
const styled_components_1 = require("styled-components");
|
|
15
|
-
const Modal = ({ theme = Theme_1.mainTheme, children, title, handleConfirm, handleClose, labelConfirm, labelClose, submitDisabled, size = 'small', }) => {
|
|
15
|
+
const Modal = ({ theme = Theme_1.mainTheme, children, title, handleConfirm, handleClose, labelConfirm, labelClose, submitDisabled, size = 'small', submitLoader = false }) => {
|
|
16
16
|
const isMultiButtons = () => {
|
|
17
17
|
return handleConfirm !== undefined && labelConfirm !== undefined;
|
|
18
18
|
};
|
|
@@ -23,6 +23,6 @@ const Modal = ({ theme = Theme_1.mainTheme, children, title, handleConfirm, hand
|
|
|
23
23
|
react_1.default.createElement(common_1.ScrollCotainer, null, children),
|
|
24
24
|
react_1.default.createElement(Aligment_1.Aligment, { justify: 'flex-end', vPadding: Theme_1.Theme.padding.l, hPadding: Theme_1.Theme.padding.l },
|
|
25
25
|
react_1.default.createElement(Button_1.Button, { mode: isMultiButtons() ? 'secondary' : 'primary', onClick: () => handleClose(), text: labelClose, left: isMultiButtons() }),
|
|
26
|
-
handleConfirm && labelConfirm && (react_1.default.createElement(Button_1.Button, { onClick: handleConfirm, text: labelConfirm, disabled: submitDisabled })))))));
|
|
26
|
+
handleConfirm && labelConfirm && (react_1.default.createElement(Button_1.Button, { onClick: handleConfirm, text: labelConfirm, disabled: submitDisabled, loader: submitLoader })))))));
|
|
27
27
|
};
|
|
28
28
|
exports.Modal = Modal;
|
|
@@ -6,7 +6,7 @@ import { Button } from '../Button';
|
|
|
6
6
|
import { ScrollCotainer } from '../common';
|
|
7
7
|
import { ModalElement, ModalOverlayer } from './Modal.styles';
|
|
8
8
|
import { ThemeProvider } from 'styled-components';
|
|
9
|
-
export const Modal = ({ theme = mainTheme, children, title, handleConfirm, handleClose, labelConfirm, labelClose, submitDisabled, size = 'small', }) => {
|
|
9
|
+
export const Modal = ({ theme = mainTheme, children, title, handleConfirm, handleClose, labelConfirm, labelClose, submitDisabled, size = 'small', submitLoader = false }) => {
|
|
10
10
|
const isMultiButtons = () => {
|
|
11
11
|
return handleConfirm !== undefined && labelConfirm !== undefined;
|
|
12
12
|
};
|
|
@@ -17,5 +17,5 @@ export const Modal = ({ theme = mainTheme, children, title, handleConfirm, handl
|
|
|
17
17
|
React.createElement(ScrollCotainer, null, children),
|
|
18
18
|
React.createElement(Aligment, { justify: 'flex-end', vPadding: Theme.padding.l, hPadding: Theme.padding.l },
|
|
19
19
|
React.createElement(Button, { mode: isMultiButtons() ? 'secondary' : 'primary', onClick: () => handleClose(), text: labelClose, left: isMultiButtons() }),
|
|
20
|
-
handleConfirm && labelConfirm && (React.createElement(Button, { onClick: handleConfirm, text: labelConfirm, disabled: submitDisabled })))))));
|
|
20
|
+
handleConfirm && labelConfirm && (React.createElement(Button, { onClick: handleConfirm, text: labelConfirm, disabled: submitDisabled, loader: submitLoader })))))));
|
|
21
21
|
};
|