Files
docmost/apps/client/src/features/space/components/create-space-modal.tsx
T
2026-05-20 14:47:04 +01:00

26 lines
708 B
TypeScript

import { Button, Divider, Modal } from "@mantine/core";
import { useDisclosure } from "@mantine/hooks";
import { CreateSpaceForm } from "@/features/space/components/create-space-form.tsx";
import { useTranslation } from "react-i18next";
export default function CreateSpaceModal() {
const { t } = useTranslation();
const [opened, { open, close }] = useDisclosure(false);
return (
<>
<Button onClick={open}>{t("Create space")}</Button>
<Modal
opened={opened}
onClose={close}
title={t("Create space")}
closeButtonProps={{ "aria-label": t("Close") }}
>
<Divider size="xs" mb="xs" />
<CreateSpaceForm />
</Modal>
</>
);
}