@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 CHANGED
@@ -159,15 +159,16 @@ const AlertDialog = ({
159
159
  open,
160
160
  title,
161
161
  description,
162
- closeButtonTitle: _closeButtonTitle = "Close",
162
+ closeButtonTitle: _closeButtonTitle = 'Close',
163
163
  onClose,
164
- confirmButtonTitle: _confirmButtonTitle = "Confirm",
164
+ confirmButtonTitle: _confirmButtonTitle = 'Confirm',
165
165
  confirmButtonDisabled: _confirmButtonDisabled = false,
166
166
  onConfirm,
167
167
  children,
168
168
  dialogProps,
169
169
  loading,
170
- maxWidth: _maxWidth = "xs"
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.4.29",
3
+ "version": "1.4.30",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,7 +28,7 @@ export interface AlertDialogProps {
28
28
  /**
29
29
  * onClose event handle function
30
30
  */
31
- onClose: () => void;
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 | "xs" | "sm" | "md" | "lg" | "xl";
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;