@pushwoosh/dumb-components 1.1.3 → 1.1.4
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.
|
@@ -9,6 +9,7 @@ export function ModalConfirm(props) {
|
|
|
9
9
|
const {
|
|
10
10
|
isOpen,
|
|
11
11
|
title = 'Confirm action',
|
|
12
|
+
size = 'small',
|
|
12
13
|
description = '',
|
|
13
14
|
confirmButtonText = 'Confirm',
|
|
14
15
|
cancelButtonText = 'Cancel',
|
|
@@ -32,7 +33,7 @@ export function ModalConfirm(props) {
|
|
|
32
33
|
}
|
|
33
34
|
}, [callback, onAccept]);
|
|
34
35
|
return React.createElement(Modal, {
|
|
35
|
-
size:
|
|
36
|
+
size: size,
|
|
36
37
|
isOpen: isOpen,
|
|
37
38
|
onClose: onCancel
|
|
38
39
|
}, React.createElement(ModalHeader, null, React.createElement(Vertical, {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type modalSizes } from '../Modal/maps';
|
|
1
3
|
export type ConfirmButtonColor = 'primary' | 'secondary' | 'danger';
|
|
2
4
|
export interface ModalConfirmProps {
|
|
3
5
|
isOpen: boolean;
|
|
4
6
|
title: string;
|
|
5
|
-
|
|
7
|
+
size?: keyof typeof modalSizes;
|
|
8
|
+
description?: ReactNode;
|
|
6
9
|
confirmButtonText?: string;
|
|
7
10
|
confirmButtonColor?: ConfirmButtonColor;
|
|
8
11
|
cancelButtonText?: string;
|