feat: complete automatic mobile board UX
This commit is contained in:
1 parent
b217d8e026
commit
e6bd1adfc2
50 files changed
+1279
-343
No files matched your search
@@ -16,6 +16,7 @@ export interface ConfirmModalProps {
|
||||
children: ReactNode;
|
||||
onConfirm?: () => MaybePromise<void>;
|
||||
onCancel?: () => MaybePromise<void>;
|
||||
onClose?: () => void;
|
||||
closeOnConfirm?: boolean;
|
||||
closeOnCancel?: boolean;
|
||||
cancelProps?: ButtonProps & ComponentPropsWithoutRef<"button">;
|
||||
|
||||
@@ -128,6 +128,7 @@ interface OpenModalOptions {
|
||||
keepMounted?: boolean;
|
||||
onClose?: () => void;
|
||||
title?: stringOrTranslation;
|
||||
onClose?: () => void;
|
||||
}
|
||||
|
||||
export const useModalAction = <TModal extends ModalDefinition>(modal: TModal) => {
|
||||
@@ -148,6 +149,10 @@ export const useConfirmModal = () => {
|
||||
const { openModal } = useModalAction(ConfirmModal);
|
||||
|
||||
return {
|
||||
openConfirmModal: (props: ConfirmModalProps) => openModal(props, { title: props.title }),
|
||||
openConfirmModal: (props: ConfirmModalProps) =>
|
||||
openModal(props, {
|
||||
title: props.title,
|
||||
onClose: props.onClose,
|
||||
}),
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user