metis-desk/modules/companies/src/web/access/help/ui/access-help-dialog.tsx

32 lines
664 B
TypeScript

import { FormDialog } from "@repo/rdx-ui/components/form-dialog";
import { useTranslation } from "react-i18next";
import type { AccessKind } from "../../../../common";
import { EntityHelp } from "./entity-help";
export function AccessHelpDialog({
kind,
scope,
open,
onOpenChange,
}: {
kind: AccessKind;
scope: string;
open: boolean;
onOpenChange: (open: boolean) => void;
}) {
const { t } = useTranslation("access");
return (
<FormDialog
cancelLabel={t("helpClose")}
onOpenChange={onOpenChange}
open={open}
title={t(`kinds.${kind}`)}
>
<EntityHelp kind={kind} scope={scope} />
</FormDialog>
);
}