Fix background of "<aside/>" elemnt

pull/8/head
Vasek Mlejnsky 6 years ago
parent 4cd52f3ecf
commit f7b50bbb01

@ -7,6 +7,7 @@ import * as React from 'react';
import raf from 'raf';
import { getViewportHeight, getScrollY } from 'utils/windowUtils';
import styled from 'styled-components';
import colors from 'config/colors';
type Props = {
location: string,
@ -14,6 +15,15 @@ type Props = {
children?: React.Node,
}
const AsideWrapper = styled.aside`
position: relative;
width: 320px;
min-width: 320px;
border-right: 1px solid ${colors.DIVIDER};
overflow-x: hidden;
background: ${colors.MAIN};
`;
const StickyContainerWrapper = styled.div`
position: relative;
top: 0;
@ -137,8 +147,8 @@ export default class StickyContainer extends React.PureComponent<Props> {
render() {
return (
<aside
ref={(node) => { this.aside = node; }}
<AsideWrapper
innerRef={(node) => { this.aside = node; }}
onScroll={this.handleScroll}
onTouchStart={this.handleScroll}
onTouchMove={this.handleScroll}
@ -149,7 +159,7 @@ export default class StickyContainer extends React.PureComponent<Props> {
>
{this.props.children}
</StickyContainerWrapper>
</aside>
</AsideWrapper>
);
}
}
Loading…
Cancel
Save