Skip to content

Commit

Permalink
Web: Common: Fixed styles for body list without scroll.
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/asc-web-common/components/PageLayout/sub-components/section-body.js
  • Loading branch information
TatianaLopaeva committed Nov 3, 2021
1 parent 4127fae commit 44f2a1c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,21 @@ import { tablet, desktop } from "@appserver/components/utils/device";

const commonStyles = css`
flex-grow: 1;
height: 100%;
${(props) => !props.withScroll && `height: 100%;`}
border-left: none;
-webkit-user-select: none;
.section-wrapper {
${(props) => !props.withScroll && `display: flex; height: 100%;`}
}
.section-wrapper-content {
${(props) =>
!props.withScroll &&
` height: 100%;
box-sizing: border-box;
`}
flex: 1 0 auto;
padding: 17px 7px 16px 24px;
outline: none;
Expand Down Expand Up @@ -56,7 +65,16 @@ const StyledSectionBody = styled.div`
props.withScroll &&
`
margin-left: -24px;
`}
`}
.additional-scroll-height {
${(props) =>
!props.withScroll &&
!props.pinned &&
` height: 64px;
`}
}
`;

const StyledDropZoneBody = styled(DragAndDrop)`
Expand Down Expand Up @@ -154,7 +172,7 @@ class SectionBody extends React.Component {
) : (
<div className="section-wrapper">
{children}
<StyledSpacer pinned={pinned} />
{/* <StyledSpacer pinned={pinned} /> */}
</div>
)}
</StyledDropZoneBody>
Expand Down Expand Up @@ -186,7 +204,7 @@ class SectionBody extends React.Component {
) : (
<div className="section-wrapper">
{children}
<StyledSpacer pinned={pinned} />
{/* <StyledSpacer pinned={pinned} /> */}
</div>
)}
</StyledSectionBody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class CustomScrollbars extends React.Component {
className={className}
>
{children}
<div className="additional-scroll-height"></div>
</Scrollbar>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ class PureVersionHistory extends React.Component {

return (
<PageLayout
withBodyScroll={true}
withBodyAutoFocus={true}
headerBorderBottom={true}
showSecondaryProgressBar={showProgressBar}
secondaryProgressBarIcon="file"
showSecondaryButtonAlert={false}
withBodyScroll={false}
>
<PageLayout.ArticleHeader>
<ArticleHeaderContent />
Expand Down

0 comments on commit 44f2a1c

Please sign in to comment.