UNPKG

@procore/core-react

Version:
24 lines (23 loc) 1 kB
import React from 'react'; import type { AnchorNavigationElementSection } from './AnchorNavigation.types'; export declare const AnchorNavigationContext: React.Context<{ offset: number; sections: AnchorNavigationElementSection[]; selected: string; registerSection: (id: string, label: string, element: HTMLElement) => void; unregisterSection: (id: string) => void; onSelect: (id: string, withScroll?: boolean) => void; }>; export declare const useAnchorNavigationContext: () => { offset: number; sections: AnchorNavigationElementSection[]; selected: string; registerSection: (id: string, label: string, element: HTMLElement) => void; unregisterSection: (id: string) => void; onSelect: (id: string, withScroll?: boolean) => void; }; interface AnchorNavigationProviderProps { offset?: number; } export declare function AnchorNavigationProvider({ children, offset, }: React.PropsWithChildren<AnchorNavigationProviderProps>): React.JSX.Element; export {};