fix: fixed in place input, refactored create board button for mobile

This commit is contained in:
2025-08-14 12:51:39 +04:00
parent 95e49eafc1
commit 8fb4121ed1
3 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,6 @@
.spacer { .spacer {
height: 46px; height: 46px;
padding: 11px 10px 12px 10px;
border-bottom: 2px solid gray; border-bottom: 2px solid gray;
width: 100%; width: 100%;
} }

View File

@ -1,5 +1,5 @@
import { IconPlus } from "@tabler/icons-react"; 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 styles from "@/app/deals/components/mobile/CreateBoardButtonMobile/CreateBoardButtonMobile.module.css";
import { useBoardsContext } from "@/app/deals/contexts/BoardsContext"; import { useBoardsContext } from "@/app/deals/contexts/BoardsContext";
import InPlaceInput from "@/components/ui/InPlaceInput/InPlaceInput"; import InPlaceInput from "@/components/ui/InPlaceInput/InPlaceInput";
@ -27,7 +27,7 @@ const CreateBoardButtonMobile = () => {
}, },
}} }}
/> />
<Box className={styles.spacer} /> <Space className={styles.spacer} />
</> </>
); );
}; };

View File

@ -70,10 +70,12 @@ const InPlaceInputDesktop: FC<Props> = ({
value={value} value={value}
onChange={e => setValue(e.target.value)} onChange={e => setValue(e.target.value)}
onKeyDown={e => { onKeyDown={e => {
e.stopPropagation();
if (e.key === "Enter") onCompleteCreating(); if (e.key === "Enter") onCompleteCreating();
if (e.key === "Escape") onCancelCreating(); if (e.key === "Escape") onCancelCreating();
}} }}
styles={inputStyles} styles={inputStyles}
miw={150}
/> />
); );
} }