Web: Files: CreateRoomDialog: removed ModalDialog wrapper

This commit is contained in:
Nikita Gopienko 2024-08-30 17:41:50 +03:00
parent d8c4bd7b4a
commit c8df42a510
4 changed files with 95 additions and 110 deletions

View File

@ -34,28 +34,6 @@ import TagHandler from "./handlers/TagHandler";
import SetRoomParams from "./sub-components/SetRoomParams";
import RoomTypeList from "./sub-components/RoomTypeList";
const StyledModalDialog = styled(ModalDialog)`
.header-with-button {
display: flex;
align-items: center;
flex-direction: row;
gap: 12px;
}
.sharing_panel-arrow svg {
${({ theme }) =>
theme.interfaceDirection === "rtl" && `transform: scaleX(-1);`}
}
${(props) =>
props.isOauthWindowOpen &&
css`
#modal-dialog {
display: none;
}
`}
`;
const CreateRoomDialog = ({
t,
visible,
@ -165,14 +143,14 @@ const CreateRoomDialog = ({
: t("Files:CreateRoom");
return (
<StyledModalDialog
<ModalDialog
displayType="aside"
withBodyScroll
visible={visible}
onClose={onCloseAndDisconnectThirdparty}
isScrollLocked={isScrollLocked}
withFooterBorder
isOauthWindowOpen={isOauthWindowOpen}
hideContent={isOauthWindowOpen}
isBackButton={roomParams.type}
onBackClick={goBack}
>
@ -226,7 +204,7 @@ const CreateRoomDialog = ({
/>
</ModalDialog.Footer>
)}
</StyledModalDialog>
</ModalDialog>
);
};

View File

@ -88,6 +88,7 @@ const ModalDialog = ({
withFooterBorder = false,
containerVisible = false,
withoutPadding = false,
hideContent = false,
...rest
}: ModalDialogProps) => {
@ -177,6 +178,7 @@ const ModalDialog = ({
embedded={embedded}
blur={blur}
withoutPadding={withoutPadding}
hideContent={hideContent}
{...rest}
/>
}

View File

@ -92,6 +92,7 @@ export interface ModalDialogProps {
embedded?: boolean;
withForm?: boolean;
withoutPadding?: boolean;
hideContent?: boolean;
blur?: number;
}
@ -162,5 +163,6 @@ export type ModalSubComponentsProps = AsideHeaderProps & {
embedded?: boolean;
withForm?: boolean;
withoutPadding?: boolean;
hideContent?: boolean;
blur?: number;
};

View File

@ -70,6 +70,7 @@ const Modal = ({
withForm,
blur,
withoutPadding,
hideContent,
...rest
}: ModalSubComponentsProps) => {
@ -146,6 +147,7 @@ const Modal = ({
style={style}
onMouseDown={validateOnMouseDown}
>
{!hideContent && (
<Content
id="modal-dialog"
visible={visible}
@ -232,6 +234,7 @@ const Modal = ({
</FormWrapper>
)}
</Content>
)}
</Dialog>
</ModalBackdrop>
</StyledModal>