ASC.Web.Components: PageLayout: added 100% height (fix broken custom scrollbar in chrome)

This commit is contained in:
Andrey Savihin 2019-09-10 15:41:52 +03:00
parent 7ac2869c68
commit ebee92092d
2 changed files with 19 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import React from 'react'
import PropTypes from "prop-types";
import styled from 'styled-components'
import Scrollbar from '../../scrollbar'
@ -6,6 +7,7 @@ const StyledArticleBody = styled.div`
margin: 16px 0;
${props => props.displayBorder && `outline: 1px dotted;`}
flex-grow: 1;
height: 100%;
`;
const ArticleBody = React.memo(props => {
@ -21,4 +23,13 @@ const ArticleBody = React.memo(props => {
);
});
ArticleBody.displayName = "ArticleBody";
ArticleBody.propTypes = {
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node
])
};
export default ArticleBody;

View File

@ -7,6 +7,7 @@ const StyledSectionBody = styled.div`
margin: 16px 0;
${props => props.displayBorder && `outline: 1px dotted;`}
flex-grow: 1;
height: 100%;
`;
const SectionBody = React.memo(props => {
@ -23,8 +24,14 @@ const SectionBody = React.memo(props => {
);
});
SectionBody.displayName = "SectionBody";
SectionBody.propTypes = {
withScroll: PropTypes.bool
withScroll: PropTypes.bool,
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node
])
};
SectionBody.defaultProps = {