Commit b72c9fb 1 parent 479dfb7 commit b72c9fb Copy full SHA for b72c9fb
File tree 2 files changed +24
-16
lines changed
2 files changed +24
-16
lines changed Original file line number Diff line number Diff line change 1
- import { HStack , Modal } from '@hope-ui/core'
1
+ import { HStack , Modal , Center } from '@hope-ui/core'
2
2
import { children , createEffect } from 'solid-js'
3
3
import { openModalStatus } from '@src/store/ui/selectors'
4
4
import { setOpenModal , type IModalMenu } from '@src/store/ui/ui'
@@ -10,21 +10,28 @@ const ModalMenu = (props: IModalMenu) => {
10
10
console . log ( 'openModalStatus:' , openModalStatus ( ) )
11
11
} )
12
12
return (
13
- < >
14
- < Modal
15
- isOpen = { openModalStatus ( ) ?? false }
16
- onClose = { ( ) => setOpenModal ( false ) }
17
- initialFocusSelector = { props . initialFocus } >
18
- < Modal . Overlay />
19
- < Modal . Content p = { 4 } >
20
- < HStack justifyContent = "space-between" mb = { 4 } >
21
- < Modal . Heading fontWeight = "semibold" > Title</ Modal . Heading >
22
- < Modal . CloseButton />
23
- </ HStack >
24
- { Children ( ) }
25
- </ Modal . Content >
26
- </ Modal >
27
- </ >
13
+ < Modal
14
+ isCentered
15
+ size = "xl"
16
+ isOpen = { openModalStatus ( ) ?? false }
17
+ onClose = { ( ) => setOpenModal ( false ) }
18
+ initialFocusSelector = { props . initialFocus }
19
+ contentTransitionOptions = { {
20
+ transition : 'pop' ,
21
+ duration : 400 ,
22
+ exitDuration : 250 ,
23
+ easing : 'ease-out' ,
24
+ exitEasing : 'ease-in' ,
25
+ } } >
26
+ < Modal . Overlay />
27
+ < Modal . Content p = { 4 } >
28
+ < HStack justifyContent = "space-between" mb = { 4 } >
29
+ < Modal . Heading fontWeight = "semibold" > { props . title } </ Modal . Heading >
30
+ < Modal . CloseButton />
31
+ </ HStack >
32
+ { Children ( ) }
33
+ </ Modal . Content >
34
+ </ Modal >
28
35
)
29
36
}
30
37
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ export interface INewMenu {
20
20
21
21
export interface IModalMenu {
22
22
children : JSXElement
23
+ title ?: string
23
24
initialFocus ?: string
24
25
}
25
26
You can’t perform that action at this time.
0 commit comments