mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #34311 from overleaf/mj-review-panel-with-tabs
[web] Move review panel header into tabs row when open GitOrigin-RevId: e4594040f7a8ca67778fdd3e31cab909b3120adb
This commit is contained in:
committed by
Copybot
parent
aed97f025c
commit
1a7b5e66f5
@@ -58,6 +58,8 @@ const TabsContext = React.createContext<
|
||||
setContextMenuTarget: React.Dispatch<
|
||||
React.SetStateAction<TabsContextMenuTarget | null>
|
||||
>
|
||||
headerSlot: HTMLElement | null
|
||||
setHeaderSlot: React.Dispatch<React.SetStateAction<HTMLElement | null>>
|
||||
}
|
||||
| undefined
|
||||
>(undefined)
|
||||
@@ -80,6 +82,8 @@ export const TabsProvider: FC<React.PropsWithChildren> = ({ children }) => {
|
||||
const [contextMenuTarget, setContextMenuTarget] =
|
||||
useState<TabsContextMenuTarget | null>(null)
|
||||
|
||||
const [headerSlot, setHeaderSlot] = useState<HTMLElement | null>(null)
|
||||
|
||||
const tabs = useMemo(() => {
|
||||
if (!tabsEnabled) {
|
||||
return []
|
||||
@@ -297,6 +301,8 @@ export const TabsProvider: FC<React.PropsWithChildren> = ({ children }) => {
|
||||
contextMenuTarget,
|
||||
setContextMenuTarget,
|
||||
closeToRight,
|
||||
headerSlot,
|
||||
setHeaderSlot,
|
||||
}),
|
||||
[
|
||||
tabs,
|
||||
@@ -308,6 +314,8 @@ export const TabsProvider: FC<React.PropsWithChildren> = ({ children }) => {
|
||||
contextMenuTarget,
|
||||
setContextMenuTarget,
|
||||
closeToRight,
|
||||
headerSlot,
|
||||
setHeaderSlot,
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user