import * as React from 'react'; import * as s from './VisibilityWrapper.scss'; export interface IVisibilityWrapperProps { children?: React.ReactElement; visible?: boolean; display?: boolean; } class VisibilityWrapper extends React.Component { static defaultProps = { display: true, visible: true }; render() { const { visible, display, children } = this.props; return (
{display ? children : null}
); } } export default VisibilityWrapper;