refactor: removed constant sizes
This commit is contained in:
@ -1,26 +1,31 @@
|
||||
import React from "react";
|
||||
import { IconPlus } from "@tabler/icons-react";
|
||||
import { Box, Center, Stack } from "@mantine/core";
|
||||
import { Box, Center, Group, Stack, Text } from "@mantine/core";
|
||||
import { useStatusesContext } from "@/app/deals/contexts/StatusesContext";
|
||||
import InPlaceInput from "@/components/ui/InPlaceInput/InPlaceInput";
|
||||
import useIsMobile from "@/hooks/useIsMobile";
|
||||
import styles from "./CreateStatusButton.module.css";
|
||||
|
||||
const CreateStatusButton = () => {
|
||||
const { onCreateStatus } = useStatusesContext();
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
return (
|
||||
<Stack>
|
||||
<Box
|
||||
ml={6}
|
||||
className={styles.container}>
|
||||
<Box className={styles.container}>
|
||||
<InPlaceInput
|
||||
placeholder={"Название колонки"}
|
||||
onComplete={onCreateStatus}
|
||||
getChildren={startEditing => (
|
||||
<Center
|
||||
p={15}
|
||||
p={"sm"}
|
||||
onClick={() => startEditing()}>
|
||||
<IconPlus size={20} />
|
||||
<Group gap={"xs"} wrap={"nowrap"} align={"start"}>
|
||||
<IconPlus />
|
||||
{isMobile && (
|
||||
<Text>Добавить</Text>
|
||||
)}
|
||||
</Group>
|
||||
</Center>
|
||||
)}
|
||||
modalTitle={"Создание колонки"}
|
||||
|
||||
Reference in New Issue
Block a user