anvil/striker-ui/hooks/useConfirmDialogProps.ts

20 lines
431 B
TypeScript
Raw Normal View History

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;