UNPKG

@promptbook/browser

Version:

Promptbook: Turn your company's scattered knowledge into AI ready books

57 lines (56 loc) 1.21 kB
import { ReactNode } from 'react'; /** * Item that can be hoisted to the top menu * * @private mechanism inside Promptbook */ export type HoistedMenuItem = { /** * Unique key for the menu item */ key?: string; /** * Icon to display */ icon: ReactNode; /** * Name/Tooltip of the item */ name: string; /** * Action to perform when clicked */ onClick: () => void; /** * If true, the item is active/toggled */ isActive?: boolean; }; type MenuHoistingContextType = { /** * The currently hoisted menu items */ menu: HoistedMenuItem[]; /** * Set the hoisted menu items */ setMenu: (items: HoistedMenuItem[]) => void; }; /** * Provider for menu hoisting * * @private mechanism inside Promptbook */ export declare function MenuHoistingProvider({ children }: { children: ReactNode; }): import("react/jsx-runtime").JSX.Element; /** * Hook to use the menu hoisting system * * @private mechanism inside Promptbook */ export declare function useMenuHoisting(): MenuHoistingContextType | null; export {}; /** * Note: [💞] Ignore a discrepancy between file name and entity name */