Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

561 B
Raw Blame
import { createContext, useContext } from "react";

/** Optional in-window title-bar strip. */
export interface TitleBarStripSlots {
  enabled: boolean;
  viewsSlot: HTMLElement | null;
  searchSlot: HTMLElement | null;
  globalsSlot: HTMLElement | null;
}

const DEFAULT: TitleBarStripSlots = {
  enabled: false,
  viewsSlot: null,
  searchSlot: null,
  globalsSlot: null,
};

export const TitleBarStripContext = createContext<TitleBarStripSlots>(DEFAULT);

export function useTitleBarStrip(): TitleBarStripSlots {
  return useContext(TitleBarStripContext);
}