DocSpace-buildtools/web/ASC.Web.Common/src/components/PageLayout/sub-components/section.js

61 lines
1.0 KiB
JavaScript
Raw Normal View History

import React from "react";
import styled, { css } from "styled-components";
import { utils } from "asc-web-components";
const { tablet } = utils.device;
const tabletProps = css`
.section-header_filter {
display: none;
}
.section-body_filter {
display: block;
margin: 0 0 16px;
}
`;
const StyledSection = styled.section`
padding: 0 0 0 24px;
flex-grow: 1;
display: flex;
flex-direction: column;
2020-08-31 10:31:39 +00:00
min-width: 344px;
.layout-progress-bar {
2020-09-18 14:06:58 +00:00
bottom: 0;
position: sticky;
2020-09-18 12:45:21 +00:00
margin-left: -24px;
@media ${tablet} {
margin-left: -16px;
}
}
.section-header_filter {
display: block;
}
.section-body_filter {
display: none;
}
2020-08-31 10:31:39 +00:00
/*${props => props.widthProp < 738 && tabletProps};*/
@media ${tablet} {
padding: 0 0 0 16px;
${tabletProps};
}
`;
class Section extends React.Component {
/*shouldComponentUpdate() {
return false;
}*/
render() {
//console.log("PageLayout Section render");
return <StyledSection {...this.props} />;
}
}
export default Section;