mirror of
https://github.com/docmost/docmost.git
synced 2026-05-22 01:32:55 +08:00
26 lines
708 B
TypeScript
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>
|
|
</>
|
|
);
|
|
}
|