feat: deal create, update, delete
This commit is contained in:
@ -0,0 +1,47 @@
|
||||
import { FC } from "react";
|
||||
import { IconCircleDotted, IconEdit } from "@tabler/icons-react";
|
||||
import { Tabs, Text } from "@mantine/core";
|
||||
import GeneralTab from "@/app/deals/drawers/DealEditorDrawer/components/GeneralTab";
|
||||
import { DealsCrud } from "@/hooks/cruds/useDealsCrud";
|
||||
import { DealSchema } from "@/lib/client";
|
||||
import styles from "../DealEditorDrawer.module.css";
|
||||
|
||||
type Props = {
|
||||
dealsCrud: DealsCrud;
|
||||
deal: DealSchema;
|
||||
onClose: () => void;
|
||||
};
|
||||
|
||||
const DealEditorBody: FC<Props> = ({ dealsCrud, deal, onClose }) => {
|
||||
return (
|
||||
<Tabs
|
||||
defaultValue="general"
|
||||
classNames={{ tab: styles.tab }}>
|
||||
<Tabs.List>
|
||||
<Tabs.Tab
|
||||
value="general"
|
||||
leftSection={<IconEdit />}>
|
||||
Общая информация
|
||||
</Tabs.Tab>
|
||||
<Tabs.Tab
|
||||
value="mock"
|
||||
leftSection={<IconCircleDotted />}>
|
||||
Mock
|
||||
</Tabs.Tab>
|
||||
</Tabs.List>
|
||||
|
||||
<Tabs.Panel value="general">
|
||||
<GeneralTab
|
||||
dealsCrud={dealsCrud}
|
||||
deal={deal}
|
||||
onClose={onClose}
|
||||
/>
|
||||
</Tabs.Panel>
|
||||
<Tabs.Panel value="mock">
|
||||
<Text>mock</Text>
|
||||
</Tabs.Panel>
|
||||
</Tabs>
|
||||
);
|
||||
};
|
||||
|
||||
export default DealEditorBody;
|
||||
Reference in New Issue
Block a user