fix: fixed in place input, refactored create board button for mobile
This commit is contained in:
@ -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%;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -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}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user