@dartech/arsenal-ui 1.4.29 → 1.4.30
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +5 -4
- package/package.json +1 -1
- package/src/lib/Alert/Alert.d.ts +4 -3
package/index.js
CHANGED
@@ -159,15 +159,16 @@ const AlertDialog = ({
|
|
159
159
|
open,
|
160
160
|
title,
|
161
161
|
description,
|
162
|
-
closeButtonTitle: _closeButtonTitle =
|
162
|
+
closeButtonTitle: _closeButtonTitle = 'Close',
|
163
163
|
onClose,
|
164
|
-
confirmButtonTitle: _confirmButtonTitle =
|
164
|
+
confirmButtonTitle: _confirmButtonTitle = 'Confirm',
|
165
165
|
confirmButtonDisabled: _confirmButtonDisabled = false,
|
166
166
|
onConfirm,
|
167
167
|
children,
|
168
168
|
dialogProps,
|
169
169
|
loading,
|
170
|
-
maxWidth: _maxWidth =
|
170
|
+
maxWidth: _maxWidth = 'xs',
|
171
|
+
hideCloseButton: _hideCloseButton = false
|
171
172
|
}) => {
|
172
173
|
return jsx("div", {
|
173
174
|
children: jsxs(Dialog, Object.assign({
|
@@ -194,7 +195,7 @@ const AlertDialog = ({
|
|
194
195
|
children: children
|
195
196
|
}))]
|
196
197
|
}), jsxs(DialogActions, {
|
197
|
-
children: [jsx(Button, Object.assign({
|
198
|
+
children: [!_hideCloseButton && jsx(Button, Object.assign({
|
198
199
|
onClick: onClose,
|
199
200
|
variant: "outlined"
|
200
201
|
}, {
|
package/package.json
CHANGED
package/src/lib/Alert/Alert.d.ts
CHANGED
@@ -28,7 +28,7 @@ export interface AlertDialogProps {
|
|
28
28
|
/**
|
29
29
|
* onClose event handle function
|
30
30
|
*/
|
31
|
-
onClose
|
31
|
+
onClose?: () => void;
|
32
32
|
/**
|
33
33
|
* onConfirm event handle function
|
34
34
|
*/
|
@@ -43,11 +43,12 @@ export interface AlertDialogProps {
|
|
43
43
|
dialogProps?: Partial<DialogProps>;
|
44
44
|
loading?: boolean;
|
45
45
|
confirmButtonDisabled?: boolean;
|
46
|
-
maxWidth?: false |
|
46
|
+
maxWidth?: false | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
47
|
+
hideCloseButton?: boolean;
|
47
48
|
}
|
48
49
|
/**
|
49
50
|
* Alert dialog component. Used for popup information
|
50
51
|
* @category Common UI components
|
51
52
|
*/
|
52
|
-
export declare const AlertDialog: ({ open, title, description, closeButtonTitle, onClose, confirmButtonTitle, confirmButtonDisabled, onConfirm, children, dialogProps, loading, maxWidth }: AlertDialogProps) => JSX.Element;
|
53
|
+
export declare const AlertDialog: ({ open, title, description, closeButtonTitle, onClose, confirmButtonTitle, confirmButtonDisabled, onConfirm, children, dialogProps, loading, maxWidth, hideCloseButton, }: AlertDialogProps) => JSX.Element;
|
53
54
|
export default AlertDialog;
|