feat: deal create, update, delete
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import React, { ReactNode } from "react";
|
||||
import { Box, ScrollArea, Stack } from "@mantine/core";
|
||||
import CreateCardButton from "@/app/deals/components/shared/CreateDealButton/CreateDealButton";
|
||||
import { StatusSchema } from "@/lib/client";
|
||||
import styles from "./StatusColumnWrapper.module.css";
|
||||
|
||||
@ -7,9 +8,14 @@ type Props = {
|
||||
status: StatusSchema;
|
||||
renderHeader: () => ReactNode;
|
||||
children: ReactNode;
|
||||
createFormEnabled?: boolean;
|
||||
};
|
||||
|
||||
const StatusColumnWrapper = ({ renderHeader, children }: Props) => {
|
||||
const StatusColumnWrapper = ({
|
||||
renderHeader,
|
||||
children,
|
||||
createFormEnabled = false,
|
||||
}: Props) => {
|
||||
return (
|
||||
<Box className={styles.container}>
|
||||
<Stack
|
||||
@ -22,7 +28,12 @@ const StatusColumnWrapper = ({ renderHeader, children }: Props) => {
|
||||
scrollbarSize={10}
|
||||
type={"always"}
|
||||
scrollbars={"y"}>
|
||||
<Stack mah={"calc(100vh - 220px)"}>{children}</Stack>
|
||||
<Stack
|
||||
gap={"xs"}
|
||||
mah={"calc(100vh - 220px)"}>
|
||||
{createFormEnabled && <CreateCardButton />}
|
||||
{children}
|
||||
</Stack>
|
||||
</ScrollArea>
|
||||
</Stack>
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user