refactor: moved ProjectEditorDrawer into common drawers directory
This commit is contained in:
@ -0,0 +1,41 @@
|
||||
import { FC } from "react";
|
||||
import { IconBlocks, IconEdit } from "@tabler/icons-react";
|
||||
import { Tabs } from "@mantine/core";
|
||||
import { ProjectSchema } from "@/lib/client";
|
||||
import styles from "../ProjectEditorDrawer.module.css";
|
||||
import { GeneralTab, ModulesTab } from "@/drawers/common/ProjectEditorDrawer/tabs";
|
||||
|
||||
type Props = {
|
||||
value: ProjectSchema;
|
||||
onChange: (value: ProjectSchema) => void;
|
||||
onDelete: (value: ProjectSchema) => void;
|
||||
};
|
||||
|
||||
const ProjectEditorBody: FC<Props> = props => {
|
||||
return (
|
||||
<Tabs
|
||||
defaultValue="general"
|
||||
classNames={{ tab: styles.tab }}>
|
||||
<Tabs.List>
|
||||
<Tabs.Tab
|
||||
value="general"
|
||||
leftSection={<IconEdit />}>
|
||||
Общая информация
|
||||
</Tabs.Tab>
|
||||
<Tabs.Tab
|
||||
value="modules"
|
||||
leftSection={<IconBlocks />}>
|
||||
Модули
|
||||
</Tabs.Tab>
|
||||
</Tabs.List>
|
||||
<Tabs.Panel value="general">
|
||||
<GeneralTab {...props} />
|
||||
</Tabs.Panel>
|
||||
<Tabs.Panel value="modules">
|
||||
<ModulesTab {...props} />
|
||||
</Tabs.Panel>
|
||||
</Tabs>
|
||||
);
|
||||
};
|
||||
|
||||
export default ProjectEditorBody;
|
||||
Reference in New Issue
Block a user