import * as React from 'react' import { ScrollContainerProps } from '../interfaces' import * as cx from 'classnames' const styles = require('../../src/styles/components/scroll-container.scss') export class ScrollContainer extends React.Component { private scrollContainer: HTMLDivElement public componentDidUpdate() { if (this.props.scrollTop) { this.scrollContainer.scrollTop = this.props.scrollTop; } } public render() { /* tslint:disable:jsx-no-lambda */ return (
this.scrollContainer = e} className={cx(styles.container, this.props.className)} style={this.props.style}> {this.props.children}
) /* tslint:enable:jsx-no-lambda */ } }