From 8fb4121ed1110accdbed6fee2d102f48fe0cc3e4 Mon Sep 17 00:00:00 2001 From: AlexSserb Date: Thu, 14 Aug 2025 12:51:39 +0400 Subject: [PATCH] fix: fixed in place input, refactored create board button for mobile --- .../CreateBoardButtonMobile.module.css | 1 - .../CreateBoardButtonMobile/CreateBoardButtonMobile.tsx | 4 ++-- src/components/ui/InPlaceInput/InPlaceInputDesktop.tsx | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/deals/components/mobile/CreateBoardButtonMobile/CreateBoardButtonMobile.module.css b/src/app/deals/components/mobile/CreateBoardButtonMobile/CreateBoardButtonMobile.module.css index 04ad843..643ce99 100644 --- a/src/app/deals/components/mobile/CreateBoardButtonMobile/CreateBoardButtonMobile.module.css +++ b/src/app/deals/components/mobile/CreateBoardButtonMobile/CreateBoardButtonMobile.module.css @@ -6,7 +6,6 @@ .spacer { height: 46px; - padding: 11px 10px 12px 10px; border-bottom: 2px solid gray; width: 100%; } diff --git a/src/app/deals/components/mobile/CreateBoardButtonMobile/CreateBoardButtonMobile.tsx b/src/app/deals/components/mobile/CreateBoardButtonMobile/CreateBoardButtonMobile.tsx index 7eeb278..4fe309b 100644 --- a/src/app/deals/components/mobile/CreateBoardButtonMobile/CreateBoardButtonMobile.tsx +++ b/src/app/deals/components/mobile/CreateBoardButtonMobile/CreateBoardButtonMobile.tsx @@ -1,5 +1,5 @@ import { IconPlus } from "@tabler/icons-react"; -import { Box } from "@mantine/core"; +import { Box, Space } from "@mantine/core"; import styles from "@/app/deals/components/mobile/CreateBoardButtonMobile/CreateBoardButtonMobile.module.css"; import { useBoardsContext } from "@/app/deals/contexts/BoardsContext"; import InPlaceInput from "@/components/ui/InPlaceInput/InPlaceInput"; @@ -27,7 +27,7 @@ const CreateBoardButtonMobile = () => { }, }} /> - + ); }; diff --git a/src/components/ui/InPlaceInput/InPlaceInputDesktop.tsx b/src/components/ui/InPlaceInput/InPlaceInputDesktop.tsx index 560e4f1..62870c2 100644 --- a/src/components/ui/InPlaceInput/InPlaceInputDesktop.tsx +++ b/src/components/ui/InPlaceInput/InPlaceInputDesktop.tsx @@ -70,10 +70,12 @@ const InPlaceInputDesktop: FC = ({ value={value} onChange={e => setValue(e.target.value)} onKeyDown={e => { + e.stopPropagation(); if (e.key === "Enter") onCompleteCreating(); if (e.key === "Escape") onCancelCreating(); }} styles={inputStyles} + miw={150} /> ); }