fix: fixed attributes page header

This commit is contained in:
2025-11-04 16:22:44 +04:00
parent 3b1aca2df1
commit 38ae35795b

View File

@ -1,7 +1,7 @@
"use client"; "use client";
import { Dispatch, FC, SetStateAction, useMemo } from "react"; import { Dispatch, FC, SetStateAction, useMemo } from "react";
import { Group, TextInput } from "@mantine/core"; import { Divider, Flex, Group, TextInput } from "@mantine/core";
import AttrViewSegmentedControl from "@/app/attributes/components/AttrViewSegmentedControl"; import AttrViewSegmentedControl from "@/app/attributes/components/AttrViewSegmentedControl";
import { useAttributesContext } from "@/app/attributes/contexts/AttributesContext"; import { useAttributesContext } from "@/app/attributes/contexts/AttributesContext";
import AttributePageView from "@/app/attributes/types/view"; import AttributePageView from "@/app/attributes/types/view";
@ -63,19 +63,24 @@ const AttributesHeader: FC<Props> = ({ view, setView }) => {
); );
return ( return (
<Group <Flex
wrap={"nowrap"} wrap={"nowrap"}
gap={"xs"}
align={isMobile ? "unset" : "center"}
mt={isMobile ? "xs" : ""} mt={isMobile ? "xs" : ""}
mx={isMobile ? "xs" : ""} mx={isMobile ? "xs" : ""}
direction={isMobile ? "column-reverse" : "row"}
justify={"space-between"}> justify={"space-between"}>
{view === AttributePageView.ATTRIBUTES {view === AttributePageView.ATTRIBUTES
? attributeActions ? attributeActions
: selectActions} : selectActions}
{isMobile && <Divider />}
<AttrViewSegmentedControl <AttrViewSegmentedControl
value={view} value={view}
onChange={setView} onChange={setView}
styles={{ root: { margin: 0, padding: 0 } }}
/> />
</Group> </Flex>
); );
}; };