fix(striker-ui): simplify ConfirmDialogProps init

main
Tsu-ba-me 2 years ago committed by digimer
parent 15674d41ee
commit c9c3092d22
  1. 19
      striker-ui/hooks/useConfirmDialogProps.ts

@ -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…
Cancel
Save