fix: roboto font, column scrolling fixed, column input width
This commit is contained in:
@ -6,6 +6,7 @@
|
|||||||
width: fit-content;
|
width: fit-content;
|
||||||
@media (max-width: 48em) {
|
@media (max-width: 48em) {
|
||||||
width: 80vw;
|
width: 80vw;
|
||||||
|
height: 73.5vh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { IconPlus } from "@tabler/icons-react";
|
import { IconPlus } from "@tabler/icons-react";
|
||||||
import { Box, Center, Group, Stack, Text } from "@mantine/core";
|
import { Box, Center, Group, Text } from "@mantine/core";
|
||||||
import { useStatusesContext } from "@/app/deals/contexts/StatusesContext";
|
import { useStatusesContext } from "@/app/deals/contexts/StatusesContext";
|
||||||
import InPlaceInput from "@/components/ui/InPlaceInput/InPlaceInput";
|
import InPlaceInput from "@/components/ui/InPlaceInput/InPlaceInput";
|
||||||
import useIsMobile from "@/hooks/utils/useIsMobile";
|
import useIsMobile from "@/hooks/utils/useIsMobile";
|
||||||
@ -11,7 +11,7 @@ const CreateStatusButton = () => {
|
|||||||
const isMobile = useIsMobile();
|
const isMobile = useIsMobile();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack className={styles.container}>
|
<Box className={styles.container}>
|
||||||
<Box className={styles["inner-container"]}>
|
<Box className={styles["inner-container"]}>
|
||||||
<InPlaceInput
|
<InPlaceInput
|
||||||
placeholder={"Название колонки"}
|
placeholder={"Название колонки"}
|
||||||
@ -32,13 +32,17 @@ const CreateStatusButton = () => {
|
|||||||
modalTitle={"Создание колонки"}
|
modalTitle={"Создание колонки"}
|
||||||
inputStyles={{
|
inputStyles={{
|
||||||
wrapper: {
|
wrapper: {
|
||||||
|
width: 250,
|
||||||
paddingInline: "var(--mantine-spacing-md)",
|
paddingInline: "var(--mantine-spacing-md)",
|
||||||
paddingBlock: "var(--mantine-spacing-xs)",
|
paddingBlock: "var(--mantine-spacing-xs)",
|
||||||
},
|
},
|
||||||
|
input: {
|
||||||
|
width: 250,
|
||||||
|
},
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
height: calc(100vh - 150px);
|
height: calc(100vh - 150px);
|
||||||
@media (max-width: 48em) {
|
@media (max-width: 48em) {
|
||||||
width: 80vw;
|
width: 80vw;
|
||||||
height: calc(100vh - 200px);
|
height: calc(100vh - 215px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12,7 +12,7 @@
|
|||||||
gap: 0;
|
gap: 0;
|
||||||
|
|
||||||
@media (max-width: 48em) {
|
@media (max-width: 48em) {
|
||||||
max-height: calc(100vh - 200px);
|
max-height: calc(100vh - 215px);
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin light {
|
@mixin light {
|
||||||
|
|||||||
@ -30,7 +30,7 @@ const StatusColumnWrapper = ({
|
|||||||
scrollbars={"y"}>
|
scrollbars={"y"}>
|
||||||
<Stack
|
<Stack
|
||||||
gap={"xs"}
|
gap={"xs"}
|
||||||
mah={"calc(100vh - 220px)"}>
|
mah={"calc(100vh - 285px)"}>
|
||||||
{createFormEnabled && <CreateCardButton />}
|
{createFormEnabled && <CreateCardButton />}
|
||||||
{children}
|
{children}
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@ -11,8 +11,9 @@ import {
|
|||||||
horizontalListSortingStrategy,
|
horizontalListSortingStrategy,
|
||||||
SortableContext,
|
SortableContext,
|
||||||
} from "@dnd-kit/sortable";
|
} from "@dnd-kit/sortable";
|
||||||
import { FreeMode, Mousewheel, Pagination, Scrollbar } from "swiper/modules";
|
import { FreeMode, Pagination, Scrollbar } from "swiper/modules";
|
||||||
import { Swiper, SwiperRef, SwiperSlide } from "swiper/react";
|
import { Swiper, SwiperRef, SwiperSlide } from "swiper/react";
|
||||||
|
import { Box } from "@mantine/core";
|
||||||
import CreateStatusButton from "@/app/deals/components/shared/CreateStatusButton/CreateStatusButton";
|
import CreateStatusButton from "@/app/deals/components/shared/CreateStatusButton/CreateStatusButton";
|
||||||
import useDndSensors from "@/app/deals/hooks/useSensors";
|
import useDndSensors from "@/app/deals/hooks/useSensors";
|
||||||
import FunnelColumn from "@/components/dnd/FunnelDnd/FunnelColumn";
|
import FunnelColumn from "@/components/dnd/FunnelDnd/FunnelColumn";
|
||||||
@ -108,6 +109,7 @@ const FunnelDnd = <
|
|||||||
const renderBody = () => {
|
const renderBody = () => {
|
||||||
if (isMobile) {
|
if (isMobile) {
|
||||||
return (
|
return (
|
||||||
|
<Box>
|
||||||
<Swiper
|
<Swiper
|
||||||
ref={swiperRef}
|
ref={swiperRef}
|
||||||
onTouchStart={swiper => {
|
onTouchStart={swiper => {
|
||||||
@ -118,32 +120,29 @@ const FunnelDnd = <
|
|||||||
}}
|
}}
|
||||||
className={classes["swiper-container"]}
|
className={classes["swiper-container"]}
|
||||||
slidesPerView={1.1}
|
slidesPerView={1.1}
|
||||||
style={{ paddingLeft: "10vw", paddingRight: "2vw" }}
|
spaceBetween={10}
|
||||||
|
style={{ paddingLeft: "10vw" }}
|
||||||
modules={[Pagination]}
|
modules={[Pagination]}
|
||||||
freeMode={{ enabled: false }}
|
freeMode={{ enabled: false }}
|
||||||
pagination={{ enabled: true, clickable: true }}>
|
pagination={{ enabled: true, clickable: true }}>
|
||||||
{renderContainers()}
|
{renderContainers()}
|
||||||
{isCreatingContainerEnabled && (
|
{isCreatingContainerEnabled && (
|
||||||
<SwiperSlide>
|
<SwiperSlide style={{ width: 250 }}>
|
||||||
<CreateStatusButton />
|
<CreateStatusButton />
|
||||||
</SwiperSlide>
|
</SwiperSlide>
|
||||||
)}
|
)}
|
||||||
</Swiper>
|
</Swiper>
|
||||||
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Swiper
|
<Swiper
|
||||||
ref={swiperRef}
|
ref={swiperRef}
|
||||||
className={classes["swiper-container"]}
|
className={classes["swiper-container"]}
|
||||||
modules={[Scrollbar, Mousewheel, FreeMode]}
|
modules={[Scrollbar, FreeMode]}
|
||||||
spaceBetween={15}
|
spaceBetween={15}
|
||||||
slidesPerView={"auto"}
|
slidesPerView={"auto"}
|
||||||
scrollbar={{ hide: false }}
|
scrollbar={{ hide: false }}
|
||||||
mousewheel={{
|
|
||||||
enabled: true,
|
|
||||||
sensitivity: 0.2,
|
|
||||||
releaseOnEdges: true,
|
|
||||||
}}
|
|
||||||
freeMode={{ enabled: true }}
|
freeMode={{ enabled: true }}
|
||||||
grabCursor>
|
grabCursor>
|
||||||
{renderContainers()}
|
{renderContainers()}
|
||||||
|
|||||||
11
src/theme.ts
11
src/theme.ts
@ -1,3 +1,4 @@
|
|||||||
|
import { Roboto } from "next/font/google";
|
||||||
import { createTheme, MantineColorsTuple } from "@mantine/core";
|
import { createTheme, MantineColorsTuple } from "@mantine/core";
|
||||||
|
|
||||||
export const myColor: MantineColorsTuple = [
|
export const myColor: MantineColorsTuple = [
|
||||||
@ -14,9 +15,17 @@ export const myColor: MantineColorsTuple = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const radius = "md";
|
const radius = "md";
|
||||||
// const size = "md";
|
|
||||||
|
const font = Roboto({
|
||||||
|
subsets: ["latin"],
|
||||||
|
weight: ["400"],
|
||||||
|
});
|
||||||
|
|
||||||
export const theme = createTheme({
|
export const theme = createTheme({
|
||||||
|
fontFamily: `${font.style.fontFamily}, sans-serif`,
|
||||||
|
headings: {
|
||||||
|
fontFamily: `${font.style.fontFamily}, sans-serif`,
|
||||||
|
},
|
||||||
colors: {
|
colors: {
|
||||||
myColor,
|
myColor,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user