import * as React from 'react'; import classnames from 'classnames'; import styles from './Drawer.scss'; import IReactComponentProps from '../../../common/structures/IReactComponentProps'; interface IProps extends IReactComponentProps { align?: 'left' | 'center' | 'right'; children: React.ReactNode; show?: boolean; noStripes?: boolean; shadow?: boolean; } interface IState { disableAnimation: boolean; } export default class Drawer extends React.Component { static defaultProps: Partial = { noStripes: false, shadow: false, }; constructor (props: IProps) { super(props); this.state = { disableAnimation: true, }; } UNSAFE_componentWillReceiveProps (nextProps: IProps) { if (nextProps.show) { this.setState({ disableAnimation: false, }); } } render () { return (
{this.props.children}
); } }