web: components: added styles to custom scrollbars
This commit is contained in:
parent
59d9d723ba
commit
95ee3436d3
@ -22,8 +22,15 @@ const StyledNav = styled.nav`
|
||||
}
|
||||
`;
|
||||
|
||||
const renderNavThumbVertical = ({ style, ...props }) =>
|
||||
<div {...props} style={{ ...style, backgroundColor: 'rgba(256, 256, 256, 0.2)', width: '2px', marginLeft: '2px', borderRadius: 'inherit'}}/>
|
||||
|
||||
const Nav = props => <StyledNav opened={props.opened}>
|
||||
<Scrollbars style={{ width: props.opened ? 240 : 56 }} {...props}/>
|
||||
<Scrollbars
|
||||
renderThumbVertical={renderNavThumbVertical}
|
||||
style={{ width: props.opened ? 240 : 56 }}
|
||||
{...props}
|
||||
/>
|
||||
</StyledNav>
|
||||
|
||||
export default Nav;
|
@ -125,6 +125,12 @@ const StyledSectionPagingPanel = styled.div`
|
||||
}
|
||||
`;
|
||||
|
||||
const renderArticleThumbVertical = ({ style, ...props }) =>
|
||||
<div {...props} style={{ ...style, backgroundColor: 'rgba(0, 0, 0, 0.1)', width: '2px', marginLeft: '2px', borderRadius: 'inherit'}}/>
|
||||
|
||||
const renderSectionThumbVertical = ({ style, ...props }) =>
|
||||
<div {...props} style={{ ...style, backgroundColor: 'rgba(0, 0, 0, 0.1)', width: '6px', borderRadius: 'inherit'}}/>
|
||||
|
||||
class PageLayout extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
@ -224,7 +230,7 @@ class PageLayout extends React.Component {
|
||||
{
|
||||
this.state.isArticleBodyAvailable &&
|
||||
<StyledArticleBody>
|
||||
<Scrollbars>
|
||||
<Scrollbars renderThumbVertical={renderArticleThumbVertical}>
|
||||
{this.state.articleBodyContent}
|
||||
</Scrollbars>
|
||||
</StyledArticleBody>
|
||||
@ -257,7 +263,7 @@ class PageLayout extends React.Component {
|
||||
{
|
||||
this.state.isSectionBodyAvailable &&
|
||||
<StyledSectionBody>
|
||||
<Scrollbars>
|
||||
<Scrollbars renderThumbVertical={renderSectionThumbVertical}>
|
||||
{this.state.sectionBodyContent}
|
||||
</Scrollbars>
|
||||
</StyledSectionBody>
|
||||
|
Loading…
Reference in New Issue
Block a user