import clsx from "clsx"; import { useContext } from "react"; import { t } from "../../i18n"; import { useDevice } from "../App"; import { SidebarPropsContext } from "./common"; import { CloseIcon, PinIcon } from "../icons"; import { Tooltip } from "../Tooltip"; import { Button } from "../Button"; export const SidebarHeader = ({ children, className, }: { children?: React.ReactNode; className?: string; }) => { const device = useDevice(); const props = useContext(SidebarPropsContext); const renderDockButton = !!( device.editor.canFitSidebar && props.shouldRenderDockButton ); return (
{children}
{renderDockButton && ( )}
); }; SidebarHeader.displayName = "SidebarHeader";