File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { Modal , Button } from 'antd' ;
2
- import NiceModal , { useModal , ModalDef } from '@ebay/nice-modal-react' ;
2
+ import NiceModal , { useModal } from '@ebay/nice-modal-react' ;
3
3
4
4
export const MyAntdModal = NiceModal . create ( ( { name } ) => {
5
5
const modal = useModal ( ) ;
6
6
return (
7
- < Modal title = "Hello Antd" visible = { modal . visible } onOk = { modal . hide } onCancel = { modal . hide } afterClose = { modal . remove } >
7
+ < Modal
8
+ title = "Hello Antd"
9
+ visible = { modal . visible }
10
+ onOk = { modal . hide }
11
+ onCancel = { modal . hide }
12
+ afterClose = { modal . remove }
13
+ >
8
14
Greetings: { name } !
9
15
</ Modal >
10
16
) ;
@@ -16,7 +22,7 @@ export default function AntdSample() {
16
22
< Button type = "primary" onClick = { ( ) => NiceModal . show ( 'my-antd-modal' , { name : 'Nate' } ) } >
17
23
Show Modal
18
24
</ Button >
19
- < ModalDef id = "my-antd-modal" component = { MyAntdModal } />
25
+ < MyAntdModal id = "my-antd-modal" />
20
26
</ >
21
27
) ;
22
28
}
You can’t perform that action at this time.
0 commit comments