feat: mobile drawer editors ui enhancement
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { IconChevronLeft, IconSettings } from "@tabler/icons-react";
|
||||
import { Box, Group, Stack, Text } from "@mantine/core";
|
||||
import { Box, Group, Stack, Title } from "@mantine/core";
|
||||
import Boards from "@/app/deals/components/shared/Boards/Boards";
|
||||
import { useBoardsContext } from "@/app/deals/contexts/BoardsContext";
|
||||
import { useProjectsContext } from "@/app/deals/contexts/ProjectsContext";
|
||||
@ -51,7 +51,7 @@ const MainBlockHeader = () => {
|
||||
onClick={openProjectsEditorDrawer}>
|
||||
<IconChevronLeft />
|
||||
</Box>
|
||||
<Text>{selectedProject?.name}</Text>
|
||||
<Title order={6}>{selectedProject?.name}</Title>
|
||||
<Box
|
||||
p={"md"}
|
||||
onClick={openBoardsEditorDrawer}>
|
||||
|
||||
@ -30,7 +30,6 @@ const BoardsMobileEditorDrawer: FC<DrawerProps<Props>> = ({
|
||||
height: "100%",
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
gap: "xs",
|
||||
},
|
||||
}}>
|
||||
<BoardsMobileContextProvider project={project}>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import React, { FC, ReactNode } from "react";
|
||||
import { IconChevronLeft, IconGripVertical } from "@tabler/icons-react";
|
||||
import { Box, Center, Divider, Group, Text } from "@mantine/core";
|
||||
import { Box, Center, Divider, Group, Stack, Title } from "@mantine/core";
|
||||
import BoardMobile from "@/app/deals/drawers/BoardsMobileEditorDrawer/components/BoardMobile";
|
||||
import CreateBoardButton from "@/app/deals/drawers/BoardsMobileEditorDrawer/components/CreateBoardButton";
|
||||
import { useBoardsMobileContext } from "@/app/deals/drawers/BoardsMobileEditorDrawer/contexts/BoardsMobileContext";
|
||||
@ -37,7 +37,7 @@ const BoardsDrawerBody: FC<Props> = ({ onClose }) => {
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Stack gap={"xs"}>
|
||||
<Group justify={"space-between"}>
|
||||
<Box
|
||||
onClick={onClose}
|
||||
@ -45,7 +45,7 @@ const BoardsDrawerBody: FC<Props> = ({ onClose }) => {
|
||||
<IconChevronLeft />
|
||||
</Box>
|
||||
<Center>
|
||||
<Text>{project.name}</Text>
|
||||
<Title order={6}>{project.name}</Title>
|
||||
</Center>
|
||||
<Box p={"lg"} />
|
||||
</Group>
|
||||
@ -58,8 +58,9 @@ const BoardsDrawerBody: FC<Props> = ({ onClose }) => {
|
||||
dragHandleStyle={{ width: "auto" }}
|
||||
vertical
|
||||
/>
|
||||
{boards.length > 0 && <Divider />}
|
||||
<CreateBoardButton onCreateBoard={boardsCrud.onCreate} />
|
||||
</>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import React, { FC } from "react";
|
||||
import { Center, Divider, Drawer, Text } from "@mantine/core";
|
||||
import { Center, Divider, Drawer, Stack, Title } from "@mantine/core";
|
||||
import { ProjectsContextProvider } from "@/app/deals/contexts/ProjectsContext";
|
||||
import ProjectsDrawerBody from "@/app/deals/drawers/StatusesMobileEditorDrawer/components/ProjectsDrawerBody";
|
||||
import { DrawerProps } from "@/drawers/types";
|
||||
@ -30,11 +30,11 @@ const ProjectsMobileEditorDrawer: FC<DrawerProps<Props>> = ({
|
||||
height: "100%",
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
gap: "xs",
|
||||
},
|
||||
}}>
|
||||
<Center>
|
||||
<Text>Проекты</Text>
|
||||
<Stack gap={"xs"}>
|
||||
<Center p={"xs"}>
|
||||
<Title order={6}>Проекты</Title>
|
||||
</Center>
|
||||
<Divider />
|
||||
<ProjectsContextProvider>
|
||||
@ -43,6 +43,7 @@ const ProjectsMobileEditorDrawer: FC<DrawerProps<Props>> = ({
|
||||
onClose={onClose}
|
||||
/>
|
||||
</ProjectsContextProvider>
|
||||
</Stack>
|
||||
</Drawer>
|
||||
);
|
||||
};
|
||||
|
||||
@ -34,9 +34,7 @@ const ProjectMobile: FC<Props> = ({ project, onSelect, closeDrawer }) => {
|
||||
|
||||
return (
|
||||
<Group
|
||||
w={"100%"}
|
||||
pl={"xs"}
|
||||
py={"xs"}
|
||||
p={"xs"}
|
||||
justify={"space-between"}
|
||||
wrap={"nowrap"}
|
||||
className={styles.project}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import React, { FC } from "react";
|
||||
import { Stack } from "@mantine/core";
|
||||
import { Divider, Stack } from "@mantine/core";
|
||||
import { useProjectsContext } from "@/app/deals/contexts/ProjectsContext";
|
||||
import CreateProjectButton from "@/app/deals/drawers/ProjectsMobileEditorDrawer/components/CreateProjectButton";
|
||||
import ProjectMobile from "@/app/deals/drawers/ProjectsMobileEditorDrawer/components/ProjectMobile";
|
||||
@ -25,6 +25,7 @@ const ProjectsDrawerBody: FC<Props> = ({ onSelect, onClose }) => {
|
||||
/>
|
||||
))}
|
||||
</Stack>
|
||||
<Divider />
|
||||
<CreateProjectButton />
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user