2019-09-12 12:15:22 +00:00
|
|
|
import React from "react";
|
2020-08-31 07:03:19 +00:00
|
|
|
import styled, { css } from "styled-components";
|
2019-12-23 13:41:52 +00:00
|
|
|
import { utils } from "asc-web-components";
|
|
|
|
const { tablet } = utils.device;
|
2019-07-20 09:48:29 +00:00
|
|
|
|
2020-08-31 07:03:19 +00:00
|
|
|
const tabletProps = css`
|
|
|
|
.section-header_filter {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.section-body_filter {
|
|
|
|
display: block;
|
|
|
|
margin: 0 0 16px;
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2019-07-20 09:48:29 +00:00
|
|
|
const StyledSection = styled.section`
|
2019-12-23 13:41:52 +00:00
|
|
|
padding: 0 0 0 24px;
|
2019-07-20 09:48:29 +00:00
|
|
|
flex-grow: 1;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2020-08-31 10:31:39 +00:00
|
|
|
min-width: 344px;
|
2019-12-23 13:41:52 +00:00
|
|
|
|
2020-04-28 14:41:34 +00:00
|
|
|
.layout-progress-bar {
|
|
|
|
position: sticky;
|
2020-09-18 12:45:21 +00:00
|
|
|
margin-left: -24px;
|
|
|
|
|
|
|
|
@media ${tablet} {
|
|
|
|
margin-left: -16px;
|
|
|
|
}
|
2020-04-28 14:41:34 +00:00
|
|
|
}
|
|
|
|
|
2020-02-12 12:26:16 +00:00
|
|
|
.section-header_filter {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.section-body_filter {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2020-08-31 10:31:39 +00:00
|
|
|
/*${props => props.widthProp < 738 && tabletProps};*/
|
2020-08-31 07:03:19 +00:00
|
|
|
|
2019-12-23 13:41:52 +00:00
|
|
|
@media ${tablet} {
|
|
|
|
padding: 0 0 0 16px;
|
2020-08-31 07:03:19 +00:00
|
|
|
${tabletProps};
|
2019-12-23 13:41:52 +00:00
|
|
|
}
|
2019-07-20 09:48:29 +00:00
|
|
|
`;
|
|
|
|
|
2019-07-28 20:39:59 +00:00
|
|
|
class Section extends React.Component {
|
|
|
|
/*shouldComponentUpdate() {
|
|
|
|
return false;
|
|
|
|
}*/
|
|
|
|
render() {
|
2019-08-13 11:21:28 +00:00
|
|
|
//console.log("PageLayout Section render");
|
2019-09-12 12:15:22 +00:00
|
|
|
return <StyledSection {...this.props} />;
|
2019-09-10 07:03:36 +00:00
|
|
|
}
|
|
|
|
}
|
2019-07-20 09:48:29 +00:00
|
|
|
|
2019-09-12 12:15:22 +00:00
|
|
|
export default Section;
|