mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-30 06:41:51 +00:00
Replace locally-forked UI components and hooks with their newly
promoted counterparts from @nous-research/ui:
Deleted local components (now in DS):
- components/ui/input.tsx, label.tsx, separator.tsx, card.tsx,
confirm-dialog.tsx
- components/Toast.tsx, BottomPickSheet.tsx, NouiTypography.tsx
- hooks/useToast.ts, useModalBehavior.ts, useBelowBreakpoint.ts,
useConfirmDelete.ts
Import updates across 25 files to use DS deep imports:
- @nous-research/ui/ui/components/{input,label,separator,card,
confirm-dialog,toast,bottom-sheet}
- @nous-research/ui/ui/components/typography (replaces NouiTypography)
- @nous-research/ui/hooks/{use-toast,use-modal-behavior,
use-below-breakpoint,use-confirm-delete}
Requires design-language >= feat/promote-hermes-web-primitives.
Co-authored-by: Cursor <cursoragent@cursor.com>
40 lines
841 B
TypeScript
40 lines
841 B
TypeScript
import { ConfirmDialog } from "@nous-research/ui/ui/components/confirm-dialog";
|
|
import { useI18n } from "@/i18n";
|
|
|
|
export function DeleteConfirmDialog({
|
|
cancelLabel,
|
|
confirmLabel,
|
|
description,
|
|
loading,
|
|
onCancel,
|
|
onConfirm,
|
|
open,
|
|
title,
|
|
}: DeleteConfirmDialogProps) {
|
|
const { t } = useI18n();
|
|
|
|
return (
|
|
<ConfirmDialog
|
|
open={open}
|
|
onCancel={onCancel}
|
|
onConfirm={onConfirm}
|
|
title={title}
|
|
description={description}
|
|
loading={loading}
|
|
destructive
|
|
confirmLabel={confirmLabel ?? t.common.delete}
|
|
cancelLabel={cancelLabel ?? t.common.cancel}
|
|
/>
|
|
);
|
|
}
|
|
|
|
interface DeleteConfirmDialogProps {
|
|
cancelLabel?: string;
|
|
confirmLabel?: string;
|
|
description?: string;
|
|
loading: boolean;
|
|
onCancel: () => void;
|
|
onConfirm: () => void;
|
|
open: boolean;
|
|
title: string;
|
|
}
|