demio-ui 2.1.53 → 2.1.54
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,8 +1,9 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
type Props = {
|
|
2
|
+
export type Props = {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
contentClassName?: string;
|
|
5
5
|
isCloseButtonVisible?: boolean;
|
|
6
|
+
onClose?: () => void;
|
|
6
7
|
onOpenChange: (open: boolean) => void;
|
|
7
8
|
open: boolean;
|
|
8
9
|
overlayClassName?: string;
|
|
@@ -11,7 +12,7 @@ type Props = {
|
|
|
11
12
|
childrenClassName?: string;
|
|
12
13
|
title?: ReactNode;
|
|
13
14
|
body?: ReactNode;
|
|
14
|
-
isClosable?: boolean;
|
|
15
|
+
isClosable?: boolean | null;
|
|
15
16
|
};
|
|
16
17
|
/**
|
|
17
18
|
- Focus is automatically trapped when modal.
|
|
@@ -19,5 +20,5 @@ type Props = {
|
|
|
19
20
|
- Esc closes the component automatically.
|
|
20
21
|
- [Accessibility and Keyboard Interactions](https://www.radix-ui.com/docs/primitives/components/dialog#accessibility)
|
|
21
22
|
**/
|
|
22
|
-
declare function Modal({ children, contentClassName, isCloseButtonVisible, onOpenChange, open, overlayClassName, title, isClosable, }: Props): React.JSX.Element;
|
|
23
|
+
declare function Modal({ children, contentClassName, isCloseButtonVisible, onClose, onOpenChange, open, overlayClassName, title, isClosable, }: Props): React.JSX.Element;
|
|
23
24
|
export default Modal;
|
package/dist/types.d.ts
CHANGED
|
@@ -197,6 +197,7 @@ type Props$6 = {
|
|
|
197
197
|
children: ReactNode;
|
|
198
198
|
contentClassName?: string;
|
|
199
199
|
isCloseButtonVisible?: boolean;
|
|
200
|
+
onClose?: () => void;
|
|
200
201
|
onOpenChange: (open: boolean) => void;
|
|
201
202
|
open: boolean;
|
|
202
203
|
overlayClassName?: string;
|
|
@@ -205,7 +206,7 @@ type Props$6 = {
|
|
|
205
206
|
childrenClassName?: string;
|
|
206
207
|
title?: ReactNode;
|
|
207
208
|
body?: ReactNode;
|
|
208
|
-
isClosable?: boolean;
|
|
209
|
+
isClosable?: boolean | null;
|
|
209
210
|
};
|
|
210
211
|
/**
|
|
211
212
|
- Focus is automatically trapped when modal.
|
|
@@ -213,7 +214,7 @@ type Props$6 = {
|
|
|
213
214
|
- Esc closes the component automatically.
|
|
214
215
|
- [Accessibility and Keyboard Interactions](https://www.radix-ui.com/docs/primitives/components/dialog#accessibility)
|
|
215
216
|
**/
|
|
216
|
-
declare function Modal({ children, contentClassName, isCloseButtonVisible, onOpenChange, open, overlayClassName, title, isClosable, }: Props$6): React__default.JSX.Element;
|
|
217
|
+
declare function Modal({ children, contentClassName, isCloseButtonVisible, onClose, onOpenChange, open, overlayClassName, title, isClosable, }: Props$6): React__default.JSX.Element;
|
|
217
218
|
|
|
218
219
|
type Option = unknown;
|
|
219
220
|
interface Props$5 {
|