Web:Common:Section: remove fixed width depend of article

This commit is contained in:
Timofey Boyko 2022-04-04 18:23:01 +03:00
parent d4b24c6ed7
commit 513a2c2b5e
2 changed files with 11 additions and 25 deletions

View File

@ -72,8 +72,8 @@ const commonStyles = css`
`;
const StyledSectionBody = styled.div`
max-width: 100vw !important;
${commonStyles}
${(props) =>
props.withScroll &&
`
@ -90,7 +90,6 @@ const StyledSectionBody = styled.div`
`
}
`}
.additional-scroll-height {
${(props) =>
!props.withScroll &&
@ -102,9 +101,8 @@ const StyledSectionBody = styled.div`
`;
const StyledDropZoneBody = styled(DragAndDrop)`
${commonStyles}
.drag-and-drop {
max-width: 100vw !important;
${commonStyles} .drag-and-drop {
user-select: none;
height: 100%;
}

View File

@ -38,23 +38,19 @@ const StyledSectionContainer = styled.section`
display: flex;
flex-direction: column;
width: calc(100vw - 256px);
max-width: calc(100vw - 256px);
width: 100%;
max-width: 100vw;
@media ${tablet} {
width: ${(props) =>
props.showText ? "calc(100vw - 240px)" : "calc(100vw - 52px)"};
max-width: ${(props) =>
props.showText ? "calc(100vw - 240px)" : "calc(100vw - 52px)"};
width: 100%;
max-width: 100vw !important;
padding: 0 0 0 16px;
}
${isMobile &&
css`
width: ${(props) =>
props.showText ? "calc(100vw - 240px)" : "calc(100vw - 52px)"} !important;
max-width: ${(props) =>
props.showText ? "calc(100vw - 240px)" : "calc(100vw - 52px)"} !important;
width: 100% !important;
max-width: 100vw !important
padding: 0 0 0 16px;
${tabletProps};
min-width: 100px;
@ -83,14 +79,6 @@ const StyledSectionContainer = styled.section`
right: 15px;
bottom: 83px;
}
${(props) =>
!props.isSectionHeaderAvailable &&
css`
width: 100vw !important;
max-width: 100vw !important;
box-sizing: border-box;
`}
`;
StyledSectionContainer.defaultProps = { theme: Base };