Web: Common: set a fixed filter menu

This commit is contained in:
Nikita Gopienko 2020-02-10 17:34:56 +03:00
parent 702b06e786
commit 4218090820
4 changed files with 8 additions and 8 deletions

View File

@ -185,12 +185,12 @@ class PageLayoutComponent extends React.PureComponent {
{this.state.isSectionHeaderAvailable && (
<SectionHeader isArticlePinned={this.state.isArticlePinned}>{this.state.sectionHeaderContent}</SectionHeader>
)}
{this.state.isSectionBodyAvailable && (
<SectionBody withScroll={this.props.withBodyScroll} autoFocus={this.props.withBodyAutoFocus} pinned={this.state.isArticlePinned}>
{this.state.isSectionFilterAvailable && (
<SectionFilter>{this.state.sectionFilterContent}</SectionFilter>
)}
{this.state.isSectionBodyAvailable && (
<SectionBody withScroll={this.props.withBodyScroll} autoFocus={this.props.withBodyAutoFocus} pinned={this.state.isArticlePinned}>
{this.state.sectionBodyContent}
{this.state.isSectionPagingAvailable && (
<SectionPaging>{this.state.sectionPagingContent}</SectionPaging>

View File

@ -15,11 +15,11 @@ const StyledSectionBody = styled.div`
`;
const StyledSectionWrapper = styled.div`
padding: 16px 8px 16px 24px;
padding: 0px 8px 16px 24px;
outline: none;
@media ${tablet} {
padding: 16px 0 16px 24px;
padding: 0px 0 16px 24px;
}
`;

View File

@ -2,12 +2,12 @@ import React from "react";
import styled from "styled-components";
const StyledSectionFilter = styled.div`
margin: 0 0 16px;
margin: 16px 0 8px 0;
`;
const SectionFilter = React.memo(props => {
//console.log("PageLayout SectionFilter render");
return <StyledSectionFilter {...props} />;
return <StyledSectionFilter className='section-filter' {...props} />;
});
SectionFilter.displayName = "SectionFilter";

View File

@ -1,5 +1,5 @@
import React from "react";
import styled, { css } from "styled-components";
import styled from "styled-components";
import { utils } from "asc-web-components";
const { tablet } = utils.device;