refactor: replaced rem with mantine constants
This commit is contained in:
@ -4,7 +4,7 @@ import { Button, Group, Stack, TextInput } from "@mantine/core";
|
||||
import { useForm } from "@mantine/form";
|
||||
import { useProjectsContext } from "@/app/deals/contexts/ProjectsContext";
|
||||
import { ClientSchema } from "@/lib/client";
|
||||
import ClientSelect from "@/modules/dealModularEditorTabs/Clients/shared/components/ClientSelect";
|
||||
import ClientSelect from "@/modules/dealModularEditorTabs/Clients/components/ClientSelect";
|
||||
import { ModuleNames } from "@/modules/modules";
|
||||
|
||||
export type CreateDealForm = {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import React, { FC } from "react";
|
||||
import { Drawer, rem } from "@mantine/core";
|
||||
import { Drawer } from "@mantine/core";
|
||||
import BoardsDrawerBody from "@/app/deals/drawers/BoardsMobileEditorDrawer/components/BoardsDrawerBody";
|
||||
import { BoardsMobileContextProvider } from "@/app/deals/drawers/BoardsMobileEditorDrawer/contexts/BoardsMobileContext";
|
||||
import { DrawerProps } from "@/drawers/types";
|
||||
@ -30,7 +30,7 @@ const BoardsMobileEditorDrawer: FC<DrawerProps<Props>> = ({
|
||||
height: "100%",
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
gap: rem(10),
|
||||
gap: "xs",
|
||||
},
|
||||
}}>
|
||||
<BoardsMobileContextProvider project={project}>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import React, { FC } from "react";
|
||||
import { Center, Divider, Drawer, rem, Text } from "@mantine/core";
|
||||
import { Center, Divider, Drawer, Text } from "@mantine/core";
|
||||
import { ProjectsContextProvider } from "@/app/deals/contexts/ProjectsContext";
|
||||
import ProjectsDrawerBody from "@/app/deals/drawers/StatusesMobileEditorDrawer/components/ProjectsDrawerBody";
|
||||
import { DrawerProps } from "@/drawers/types";
|
||||
@ -30,7 +30,7 @@ const ProjectsMobileEditorDrawer: FC<DrawerProps<Props>> = ({
|
||||
height: "100%",
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
gap: rem(10),
|
||||
gap: "xs",
|
||||
},
|
||||
}}>
|
||||
<Center>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import React, { FC } from "react";
|
||||
import { Drawer, rem } from "@mantine/core";
|
||||
import { Drawer } from "@mantine/core";
|
||||
import StatusesDrawerBody from "@/app/deals/drawers/StatusesMobileEditorDrawer/components/StatusesDrawerBody";
|
||||
import { StatusesMobileContextProvider } from "@/app/deals/drawers/StatusesMobileEditorDrawer/contexts/BoardStatusesContext";
|
||||
import { DrawerProps } from "@/drawers/types";
|
||||
@ -30,7 +30,7 @@ const StatusesMobileEditorDrawer: FC<DrawerProps<Props>> = ({
|
||||
height: "100%",
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
gap: rem(10),
|
||||
gap: "xs",
|
||||
},
|
||||
}}>
|
||||
<StatusesMobileContextProvider board={board}>
|
||||
|
||||
@ -4,7 +4,6 @@ import {
|
||||
Button,
|
||||
Flex,
|
||||
NumberInput,
|
||||
rem,
|
||||
Space,
|
||||
Text,
|
||||
TextInput,
|
||||
@ -37,7 +36,7 @@ const DealsBoardFiltersModal = ({
|
||||
return (
|
||||
<form onSubmit={filtersForm.onSubmit(onSubmit)}>
|
||||
<Flex
|
||||
gap={rem(10)}
|
||||
gap={"xs"}
|
||||
direction={"column"}>
|
||||
<NumberInput
|
||||
label={"ID"}
|
||||
|
||||
@ -4,7 +4,6 @@ import {
|
||||
Button,
|
||||
Flex,
|
||||
NumberInput,
|
||||
rem,
|
||||
Space,
|
||||
Text,
|
||||
TextInput,
|
||||
@ -39,7 +38,7 @@ const DealsScheduleFiltersModal = ({
|
||||
return (
|
||||
<form onSubmit={filtersForm.onSubmit(onSubmit)}>
|
||||
<Flex
|
||||
gap={rem(10)}
|
||||
gap={"xs"}
|
||||
direction={"column"}>
|
||||
<NumberInput
|
||||
label={"ID"}
|
||||
|
||||
@ -4,7 +4,6 @@ import {
|
||||
Button,
|
||||
Flex,
|
||||
NumberInput,
|
||||
rem,
|
||||
Space,
|
||||
Text,
|
||||
TextInput,
|
||||
@ -39,7 +38,7 @@ const DealsTableFiltersModal = ({
|
||||
return (
|
||||
<form onSubmit={filtersForm.onSubmit(onSubmit)}>
|
||||
<Flex
|
||||
gap={rem(10)}
|
||||
gap={"xs"}
|
||||
direction={"column"}>
|
||||
<NumberInput
|
||||
label={"ID"}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
.draggable-row[data-is-dragging='true'] td {
|
||||
opacity: 0.75;
|
||||
border: rem(1px) solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));
|
||||
border: 1px solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { FC } from "react";
|
||||
import { IconTrash } from "@tabler/icons-react";
|
||||
import { isNumber } from "lodash";
|
||||
import { Flex, Input, NumberInput, rem } from "@mantine/core";
|
||||
import { Flex, Input, NumberInput } from "@mantine/core";
|
||||
import ActionIconWithTip from "@/components/ui/ActionIconWithTip/ActionIconWithTip";
|
||||
import InlineButton from "@/components/ui/InlineButton/InlineButton";
|
||||
import { ServicePriceRangeSchema } from "@/lib/client";
|
||||
@ -50,7 +50,7 @@ const RangePriceInput: FC<PriceRangeInputType> = props => {
|
||||
{props.value.map((range, idx) => (
|
||||
<Flex
|
||||
key={idx}
|
||||
gap={rem(10)}
|
||||
gap={"xs"}
|
||||
align={"flex-end"}>
|
||||
<ActionIconWithTip onClick={() => onDeleteRange(idx)}>
|
||||
<IconTrash />
|
||||
|
||||
@ -98,7 +98,7 @@ const ImageDropzone: FC<Props> = (props: Props) => {
|
||||
|
||||
return (
|
||||
<Flex
|
||||
gap={rem(10)}
|
||||
gap={"xs"}
|
||||
direction={"column"}>
|
||||
<Fieldset legend={"Изображение"}>
|
||||
<Flex justify={"center"}>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { Button, Flex, rem, TextInput } from "@mantine/core";
|
||||
import { Button, Flex, TextInput } from "@mantine/core";
|
||||
import { useForm } from "@mantine/form";
|
||||
import { ContextModalProps } from "@mantine/modals";
|
||||
|
||||
@ -35,7 +35,7 @@ const EnterNameModal = ({
|
||||
return (
|
||||
<form onSubmit={form.onSubmit(values => onSubmit(values))}>
|
||||
<Flex
|
||||
gap={rem(10)}
|
||||
gap={"xs"}
|
||||
direction={"column"}>
|
||||
<TextInput
|
||||
{...form.getInputProps("name")}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { FC } from "react";
|
||||
import { Stack } from "@mantine/core";
|
||||
import { DealSchema } from "@/lib/client";
|
||||
import ClientDataForm from "@/modules/dealModularEditorTabs/Clients/shared/components/ClientDataForm";
|
||||
import ClientSelectForm from "@/modules/dealModularEditorTabs/Clients/shared/components/ClientSelectForm";
|
||||
import { ClientTabContextProvider } from "@/modules/dealModularEditorTabs/Clients/shared/contexts/ClientTabContext";
|
||||
import ClientDataForm from "@/modules/dealModularEditorTabs/Clients/components/ClientDataForm";
|
||||
import ClientSelectForm from "@/modules/dealModularEditorTabs/Clients/components/ClientSelectForm";
|
||||
import { ClientTabContextProvider } from "./contexts/ClientTabContext";
|
||||
|
||||
type Props = {
|
||||
value: DealSchema;
|
||||
@ -1,7 +1,7 @@
|
||||
import { Fieldset, Group, Stack } from "@mantine/core";
|
||||
import InlineButton from "@/components/ui/InlineButton/InlineButton";
|
||||
import useIsMobile from "@/hooks/utils/useIsMobile";
|
||||
import ClientSelect from "@/modules/dealModularEditorTabs/Clients/shared/components/ClientSelect";
|
||||
import ClientSelect from "@/modules/dealModularEditorTabs/Clients/components/ClientSelect";
|
||||
import { useClientTabContext } from "../contexts/ClientTabContext";
|
||||
|
||||
const ClientSelectForm = () => {
|
||||
@ -1,7 +1,7 @@
|
||||
import { FC } from "react";
|
||||
import { IconTrash } from "@tabler/icons-react";
|
||||
import { isNumber } from "lodash";
|
||||
import { Divider, Group, NumberInput, rem, Stack, Text } from "@mantine/core";
|
||||
import { Divider, Group, NumberInput, Stack, Text } from "@mantine/core";
|
||||
import { useDebouncedCallback } from "@mantine/hooks";
|
||||
import ActionIconWithTip from "@/components/ui/ActionIconWithTip/ActionIconWithTip";
|
||||
import { DealServiceSchema } from "@/lib/client";
|
||||
@ -64,7 +64,7 @@ const DealServiceRow: FC<Props> = ({ value, onChange, onDelete }) => {
|
||||
display: "flex",
|
||||
cursor: "pointer",
|
||||
pointerEvents: "auto",
|
||||
paddingRight: rem(10),
|
||||
paddingRight: "xs",
|
||||
},
|
||||
}}
|
||||
rightSection={
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { Fieldset, Flex, rem, TextInput } from "@mantine/core";
|
||||
import { Fieldset, Flex, TextInput } from "@mantine/core";
|
||||
import { useForm } from "@mantine/form";
|
||||
import { ContextModalProps } from "@mantine/modals";
|
||||
import {
|
||||
@ -59,7 +59,7 @@ const ProductEditorModal = ({
|
||||
closeOnSubmit
|
||||
onClose={onClose}>
|
||||
<Flex
|
||||
gap={rem(10)}
|
||||
gap={"xs"}
|
||||
direction={"column"}>
|
||||
<Fieldset legend={"Основные характеристики"}>
|
||||
<TextInput
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
export { default as CommonServicesTab } from "@/modules/dealModularEditorTabs/FulfillmentBase/mobile/CommonServicesTab";
|
||||
export { default as FulfillmentBaseTab } from "@/modules/dealModularEditorTabs/FulfillmentBase/desktop/FulfillmentBaseTab";
|
||||
export { default as ProductsTab } from "@/modules/dealModularEditorTabs/FulfillmentBase/mobile/ProductsTab";
|
||||
export { default as ClientsTab } from "@/modules/dealModularEditorTabs/Clients/shared/ClientsTab";
|
||||
export { default as ClientsTab } from "@/modules/dealModularEditorTabs/Clients/ClientsTab";
|
||||
|
||||
Reference in New Issue
Block a user