2021-01-27 05:30:55 -05:00
|
|
|
import React from 'react'
|
|
|
|
import PropTypes from 'prop-types'
|
|
|
|
import MenuButton from './menu-button'
|
|
|
|
import CobrandingLogo from './cobranding-logo'
|
|
|
|
import BackToProjectsButton from './back-to-projects-button'
|
2021-02-09 10:37:48 -05:00
|
|
|
import ChatToggleButton from './chat-toggle-button'
|
2021-01-27 05:30:55 -05:00
|
|
|
|
2021-02-09 10:37:48 -05:00
|
|
|
function ToolbarHeader({
|
|
|
|
cobranding,
|
|
|
|
onShowLeftMenuClick,
|
|
|
|
chatIsOpen,
|
|
|
|
toggleChatOpen,
|
|
|
|
unreadMessageCount
|
|
|
|
}) {
|
2021-01-27 05:30:55 -05:00
|
|
|
return (
|
|
|
|
<header className="toolbar toolbar-header toolbar-with-labels">
|
|
|
|
<div className="toolbar-left">
|
|
|
|
<MenuButton onClick={onShowLeftMenuClick} />
|
|
|
|
{cobranding ? <CobrandingLogo {...cobranding} /> : null}
|
|
|
|
<BackToProjectsButton />
|
|
|
|
</div>
|
2021-02-09 10:37:48 -05:00
|
|
|
<div className="toolbar-right">
|
|
|
|
<ChatToggleButton
|
|
|
|
chatIsOpen={chatIsOpen}
|
|
|
|
onClick={toggleChatOpen}
|
|
|
|
unreadMessageCount={unreadMessageCount}
|
|
|
|
/>
|
|
|
|
</div>
|
2021-01-27 05:30:55 -05:00
|
|
|
</header>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
ToolbarHeader.propTypes = {
|
|
|
|
onShowLeftMenuClick: PropTypes.func.isRequired,
|
2021-02-09 10:37:48 -05:00
|
|
|
cobranding: PropTypes.object,
|
|
|
|
chatIsOpen: PropTypes.bool,
|
|
|
|
toggleChatOpen: PropTypes.func.isRequired,
|
|
|
|
unreadMessageCount: PropTypes.number.isRequired
|
2021-01-27 05:30:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
export default ToolbarHeader
|