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";
|
2020-11-09 12:42:48 +00:00
|
|
|
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;
|
2020-10-26 11:24:09 +00:00
|
|
|
margin: 0 0 25px;
|
2020-08-31 07:03:19 +00:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
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-10-29 14:33:05 +00:00
|
|
|
/*width: ${(props) => `${props.widthProp}px`};*/
|
2020-04-28 14:41:34 +00:00
|
|
|
.layout-progress-bar {
|
2020-09-18 14:06:58 +00:00
|
|
|
bottom: 0;
|
2020-04-28 14:41:34 +00:00
|
|
|
position: sticky;
|
2020-09-18 12:45:21 +00:00
|
|
|
margin-left: -24px;
|
2020-10-16 12:38:04 +00:00
|
|
|
|
2020-09-18 12:45:21 +00:00
|
|
|
@media ${tablet} {
|
|
|
|
margin-left: -16px;
|
|
|
|
}
|
2020-04-28 14:41:34 +00:00
|
|
|
}
|
|
|
|
|
2020-02-12 12:26:16 +00:00
|
|
|
.section-header_filter {
|
2020-10-16 12:38:04 +00:00
|
|
|
display: block;
|
|
|
|
}
|
2020-02-12 12:26:16 +00:00
|
|
|
|
2020-10-16 12:38:04 +00:00
|
|
|
.section-body_filter {
|
|
|
|
display: none;
|
|
|
|
}
|
2019-12-23 13:41:52 +00:00
|
|
|
@media ${tablet} {
|
|
|
|
padding: 0 0 0 16px;
|
2020-11-09 12:42:48 +00:00
|
|
|
//width:100%;
|
|
|
|
//overflow: hidden;
|
2020-08-31 07:03:19 +00:00
|
|
|
${tabletProps};
|
2019-12-23 13:41:52 +00:00
|
|
|
}
|
2020-11-09 12:42:48 +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;
|