parent
15674d41ee
commit
c9c3092d22
1 changed files with 19 additions and 0 deletions
@ -0,0 +1,19 @@ |
|||||||
|
import { Dispatch, SetStateAction, useState } from 'react'; |
||||||
|
|
||||||
|
const useConfirmDialogProps = ({ |
||||||
|
actionProceedText = '', |
||||||
|
content = '', |
||||||
|
titleText = '', |
||||||
|
...restProps |
||||||
|
}: Partial<ConfirmDialogProps> = {}): [ |
||||||
|
ConfirmDialogProps, |
||||||
|
Dispatch<SetStateAction<ConfirmDialogProps>>, |
||||||
|
] => |
||||||
|
useState<ConfirmDialogProps>({ |
||||||
|
actionProceedText, |
||||||
|
content, |
||||||
|
titleText, |
||||||
|
...restProps, |
||||||
|
}); |
||||||
|
|
||||||
|
export default useConfirmDialogProps; |
Loading…
Reference in new issue