fix: the web version should not display client borders (#4040)

Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
JimmFly
2023-09-01 02:15:22 +08:00
committed by GitHub
parent 97a0969583
commit 6be176b4e3
2 changed files with 9 additions and 2 deletions

View File

@@ -50,10 +50,17 @@ export const HeaderItem = ({
const [open, setOpen] = useState(false);
const pushLayout = useSetAtom(pushLayoutAtom);
const deleteLayout = useSetAtom(deleteLayoutAtom);
const [container, setContainer] = useState<HTMLButtonElement | null>(null);
return (
<Tooltip content={`${open ? 'Collapse' : 'Expand'} table of contents`}>
<Tooltip
content={`${open ? 'Collapse' : 'Expand'} table of contents`}
portalOptions={{
container,
}}
>
<IconButton
ref={setContainer}
onClick={useCallback(() => {
if (!open) {
setOpen(true);