import React from 'react'; import { FormattedMessage as T } from 'components'; import { Classes, Icon, H4, Button } from '@blueprintjs/core'; import withDrawerActions from 'containers/Drawer/withDrawerActions'; import styled from 'styled-components'; import { compose } from 'utils'; /** * Drawer header content. */ function DrawerHeaderContent(props) { const { icon, title = , subTitle, onClose, name, closeDrawer, } = props; if (title == null) { return null; } const handleClose = (event) => { closeDrawer(name); onClose && onClose(event); }; return (

{title} {subTitle}

); } export default compose(withDrawerActions)(DrawerHeaderContent); /** * SubTitle Drawer header. * @returns {React.JSX} */ function SubTitle({ children }) { if (children == null) { return null; } return {children}; } const SubTitleHead = styled.div` color: #666; font-size: 12px; font-weight: 400; line-height: 1; padding: 2px 0px; margin: 2px 0px; `;