refactor: drawers refactored

This commit is contained in:
2025-09-06 11:09:42 +04:00
parent 67780b5251
commit d76dc82cb8
44 changed files with 239 additions and 227 deletions

View File

@ -0,0 +1,33 @@
import { FC } from "react";
import { IconPlus } from "@tabler/icons-react";
import { Box, Group, Text } from "@mantine/core";
import { modals } from "@mantine/modals";
import { useStatusesMobileContext } from "@/app/deals/drawers/StatusesMobileEditorDrawer/contexts/BoardStatusesContext";
const CreateStatusButton: FC = () => {
const { statusesCrud } = useStatusesMobileContext();
const onStartCreating = () => {
modals.openContextModal({
modal: "enterNameModal",
title: "Создание колонки",
withCloseButton: true,
innerProps: {
onChange: values => statusesCrud.onCreate(values.name),
},
});
};
return (
<Group
ml={"xs"}
onClick={onStartCreating}>
<IconPlus />
<Box mt={5}>
<Text>Создать колонку</Text>
</Box>
</Group>
);
};
export default CreateStatusButton;