feat: division between mobile and desktop components, boards for mobile
This commit is contained in:
@ -0,0 +1,34 @@
|
||||
import { IconPlus } from "@tabler/icons-react";
|
||||
import { Box } from "@mantine/core";
|
||||
import { useBoardsContext } from "@/app/deals/contexts/BoardsContext";
|
||||
import SmallPageBlock from "@/components/layout/SmallPageBlock/SmallPageBlock";
|
||||
import InPlaceInput from "@/components/ui/InPlaceInput/InPlaceInput";
|
||||
|
||||
const CreateBoardButton = () => {
|
||||
const { onCreateBoard } = useBoardsContext();
|
||||
|
||||
return (
|
||||
<SmallPageBlock style={{ cursor: "pointer" }}>
|
||||
<InPlaceInput
|
||||
placeholder={"Название доски"}
|
||||
onComplete={onCreateBoard}
|
||||
getChildren={startEditing => (
|
||||
<Box
|
||||
p={"sm"}
|
||||
onClick={startEditing}>
|
||||
<IconPlus />
|
||||
</Box>
|
||||
)}
|
||||
modalTitle={"Создание доски"}
|
||||
inputStyles={{
|
||||
wrapper: {
|
||||
marginLeft: 15,
|
||||
marginRight: 15,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</SmallPageBlock>
|
||||
);
|
||||
};
|
||||
|
||||
export default CreateBoardButton;
|
||||
Reference in New Issue
Block a user