metis-desk/modules/identity/src/web/components/account-password-dialog.tsx
2026-10-08 16:43:34 +02:00

32 lines
672 B
TypeScript

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>
);
}