import { Collection, CustomizationSettings, Space } from '@gitbook/api'; import { Suspense } from 'react'; import { CONTAINER_MAX_WIDTH_NORMAL, CONTAINER_PADDING } from '@/components/layout'; import { t } from '@/lib/intl'; import { ContentRefContext } from '@/lib/references'; import { tcls } from '@/lib/tailwind'; import { CollectionSpacesDropdown } from './CollectionSpacesDropdown'; import { HeaderLink } from './HeaderLink'; import { HeaderLogo } from './HeaderLogo'; import { SearchButton } from '../Search'; /** * Render the header for the space. */ export function Header(props: { space: Space; collection: Collection | null; collectionSpaces: Space[]; context: ContentRefContext; asFullWidth: boolean; customization: CustomizationSettings; }) { const { context, space, collection, collectionSpaces, asFullWidth, customization } = props; return (
{collection ? ( ) : null}
{customization.header.links.map((link, index) => ( ))}
{t({ space }, 'search')}
); }