Git support (#143)

This commit is contained in:
Gregory Schier
2025-02-07 07:59:48 -08:00
committed by GitHub
parent cffc7714c1
commit 1a7c27663a
111 changed files with 4264 additions and 372 deletions
+13 -3
View File
@@ -6,9 +6,9 @@ import { showDialog } from './dialog';
type ConfirmArgs = {
id: string;
} & Pick<DialogProps, 'title' | 'description'> &
Pick<ConfirmProps, 'variant' | 'confirmText'>;
Pick<ConfirmProps, 'color' | 'confirmText'>;
export async function showConfirm({ id, title, description, variant, confirmText }: ConfirmArgs) {
export async function showConfirm({ id, title, description, color, confirmText }: ConfirmArgs) {
return new Promise((onResult: ConfirmProps['onResult']) => {
showDialog({
id,
@@ -17,7 +17,17 @@ export async function showConfirm({ id, title, description, variant, confirmText
hideX: true,
size: 'sm',
disableBackdropClose: true, // Prevent accidental dismisses
render: ({ hide }) => Confirm({ onHide: hide, variant, onResult, confirmText }),
render: ({ hide }) => Confirm({ onHide: hide, color, onResult, confirmText }),
});
});
}
export async function showConfirmDelete({ id, title, description }: ConfirmArgs) {
return showConfirm({
id,
title,
description,
color: 'danger',
confirmText: 'Delete',
});
}