metis-desk/modules/identity/src/web/components/account-password-dialog.tsx

32 lines
672 B
TypeScript
Raw Normal View History

2026-10-08 14:43:34 +00:00
import { FormDialog } from "@repo/shadcn-ui/components/form-dialog";
import { useTranslation } from "react-i18next";
import { PasswordForm } from "./password-form";
export function AccountPasswordDialog({
open,
csrfToken,
onClose,
}: {
open: boolean;
csrfToken: string;
onClose: () => void;
}) {
const { t } = useTranslation("identity");
return (
<FormDialog
cancelLabel={t("cancel")}
formActions
onOpenChange={(value) => {
if (!value) {
onClose();
}
}}
open={open}
title={t("changePassword")}
>
<PasswordForm csrfToken={csrfToken} showTitle={false} />
</FormDialog>
);
}