web: components: render scrollbars outside content

This commit is contained in:
Andrey Savihin 2019-11-14 16:04:42 +03:00
parent 1b3e977d0e
commit 1de160c7cc
3 changed files with 7 additions and 2 deletions

View File

@ -4,6 +4,7 @@ import styled from "styled-components";
const StyledSectionHeader = styled.div`
border-bottom: 1px solid #eceef1;
height: 56px;
margin-right: 16px;
`;
const SectionHeader = React.memo(props => {

View File

@ -2,7 +2,7 @@ import React from "react";
import styled from "styled-components";
const StyledSection = styled.section`
padding: 0 16px;
padding: 0 0 0 16px;
flex-grow: 1;
display: flex;
flex-direction: column;

View File

@ -36,8 +36,12 @@ const Scrollbar = React.forwardRef((props, ref) => {
<div {...props} style={{ ...style, ...thumbH }} />
);
const renderView = ({ style, ...props }) => (
<div {...props} style={{paddingRight: '16px', ...style}} />
);
return (
<Scrollbars renderThumbVertical={renderNavThumbVertical} renderThumbHorizontal={renderNavThumbHorizontal} {...props} ref={ref} />
<Scrollbars renderView={renderView} renderThumbVertical={renderNavThumbVertical} renderThumbHorizontal={renderNavThumbHorizontal} {...props} ref={ref} />
);
});