2024-08-12 05:50:54 -04:00
|
|
|
import { FC, memo, useState } from 'react'
|
2024-08-19 09:16:56 -04:00
|
|
|
import { ReviewPanelResolvedThreadsButton } from './review-panel-resolved-threads-button'
|
2024-08-12 05:50:54 -04:00
|
|
|
import { ReviewPanelTrackChangesMenu } from './review-panel-track-changes-menu'
|
|
|
|
import ReviewPanelTrackChangesMenuButton from './review-panel-track-changes-menu-button'
|
|
|
|
import { Button } from 'react-bootstrap'
|
|
|
|
import MaterialIcon from '@/shared/components/material-icon'
|
|
|
|
import { useLayoutContext } from '@/shared/context/layout-context'
|
|
|
|
|
2024-08-22 05:44:22 -04:00
|
|
|
const ReviewPanelHeader: FC = () => {
|
2024-08-12 05:50:54 -04:00
|
|
|
const [trackChangesMenuExpanded, setTrackChangesMenuExpanded] =
|
|
|
|
useState(false)
|
|
|
|
const { setReviewPanelOpen } = useLayoutContext()
|
|
|
|
|
|
|
|
return (
|
2024-08-22 05:44:22 -04:00
|
|
|
<div className="review-panel-header">
|
2024-08-12 05:50:54 -04:00
|
|
|
<div className="review-panel-heading">
|
|
|
|
<div className="review-panel-label">Review</div>
|
|
|
|
<Button
|
|
|
|
bsStyle={null}
|
|
|
|
className="review-panel-close-button"
|
|
|
|
type="button"
|
|
|
|
onClick={() => setReviewPanelOpen(false)}
|
|
|
|
>
|
|
|
|
<MaterialIcon type="close" />
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
<div className="review-panel-tools">
|
2024-08-19 09:16:56 -04:00
|
|
|
<ReviewPanelResolvedThreadsButton />
|
2024-08-12 05:50:54 -04:00
|
|
|
<ReviewPanelTrackChangesMenuButton
|
|
|
|
menuExpanded={trackChangesMenuExpanded}
|
|
|
|
setMenuExpanded={setTrackChangesMenuExpanded}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{trackChangesMenuExpanded && <ReviewPanelTrackChangesMenu />}
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default memo(ReviewPanelHeader)
|