import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import { CX } from '../../constants' import { me, emailConfirmed, } from '../../initial_state' import Button from '../button' import Heading from '../heading' import BackButton from '../back_button' import Pills from '../pills' class SidebarLayout extends React.PureComponent { render() { const { actions, tabs, title, showBackBtn, children, } = this.props const innerContainerClasses = CX({ d: 1, posFixed: 1, calcH53PX: emailConfirmed || !me, calcH106PX: !emailConfirmed && !!me, bottom0: 1, }) return (
{ !!title &&
{ showBackBtn && } {title} { !!actions &&
{ actions.map((action, i) => (
}
} { !!tabs &&
}
) } } SidebarLayout.propTypes = { actions: PropTypes.array, tabs: PropTypes.array, title: PropTypes.string, showBackBtn: PropTypes.bool, } export default SidebarLayout