Client: RoomsSelector: Fixed styles because of an aside header component.

This commit is contained in:
Tatiana Lopaeva 2024-08-22 17:52:35 +03:00
parent 23ae780278
commit 646fcb815b
3 changed files with 4 additions and 14 deletions

View File

@ -105,13 +105,12 @@ const RoomsSelectorInput = (props) => {
submitButtonLabel={submitButtonLabel}
onSubmit={handleOnSubmit}
withHeader={withHeader}
headerProps={headerProps}
headerProps={{ ...headerProps, onCloseClick: onClose }}
setIsDataReady={setIsDataReady}
roomType={roomType}
/>
);
console.log("ROOMS");
return (
<StyledBodyWrapper maxWidth={maxWidth} className={className}>
<FileInput
@ -138,6 +137,7 @@ const RoomsSelectorInput = (props) => {
withoutBodyScroll
zIndex={310}
onClose={onClose}
withoutHeader
>
{SelectorBody}
</Aside>

View File

@ -34,6 +34,7 @@ export interface AsideProps {
withoutBodyScroll?: boolean;
onClose: () => void;
withoutHeader: boolean;
header: AsideHeaderProps["header"];
isBackButton?: AsideHeaderProps["isBackButton"];
isCloseable?: AsideHeaderProps["isCloseable"];

View File

@ -44,7 +44,6 @@ import { TTranslation } from "../../types";
import { RoomSelectorProps } from "./RoomSelector.types";
import { convertToItems } from "./RoomSelector.utils";
import { Aside } from "../../components/aside";
const PAGE_COUNT = 100;
@ -211,7 +210,7 @@ const RoomSelector = ({
}
: {};
const SelectorRoom = (
return (
<Selector
id={id}
className={className}
@ -246,16 +245,6 @@ const RoomSelector = ({
}
/>
);
if (!onClose) {
return SelectorRoom;
}
return (
<Aside visible onClose={onClose} withoutBodyScroll>
{SelectorRoom}
</Aside>
);
};
export default RoomSelector;