This commit is contained in:
2024-03-03 07:23:41 +03:00
parent d43c0a5839
commit 0db252bb27
57 changed files with 1707 additions and 105 deletions

View File

@@ -0,0 +1,24 @@
.container {
width: 100%;
display: flex;
flex-direction: column;
/*background-color: green;*/
}
.header {
display: flex;
align-items: stretch;
text-align: center;
flex-direction: column;
/*border: solid var(--item-border-size) var(--mantine-color-default-border);*/
/*border-radius: var(--item-border-radius);*/
}
.items-list {
gap: 0.5rem;
display: flex;
flex-direction: column;
/*background-color: red;*/
height: 100%;
}

View File

@@ -0,0 +1,53 @@
import {FC} from "react";
import styles from './Board.module.css';
import {Divider, Text, Title} from '@mantine/core';
import {Draggable, Droppable} from "@hello-pangea/dnd";
import CreateLeadButton from "../CreateLeadButton/CreateLeadButton.tsx";
type Props = {
droppableId: string;
title: string;
withCreateButton?: boolean;
}
export const Board: FC<Props> = ({droppableId, title, withCreateButton = false}) => {
return (
<div className={styles["container"]}>
<div className={styles["header"]}>
<Title size={"h4"}>{title}</Title>
<Text>12 сделок: 500р</Text>
<Divider size={"xl"} my={10} color={"blue"}/>
</div>
<Droppable droppableId={droppableId}>
{(provided, snapshot) => (
<div ref={provided.innerRef} className={styles["items-list"]}>
{withCreateButton &&
<CreateLeadButton
onClick={() => {
}}
/>}
<Draggable draggableId={droppableId + '1'} index={1}>
{(provided, snapshot) => (
<div {...provided.draggableProps}
{...provided.dragHandleProps}
ref={provided.innerRef}
>
</div>
)}
</Draggable>
{provided.placeholder}
</div>
)}
</Droppable>
</div>
)
}
export default Board;