UNPKG

zent

Version:

一套前端设计语言和基于React的实现

17 lines (14 loc) 495 B
import { createContext } from 'react'; export interface IElevatorContextProps { activeLink: string; offsetTop: number; onLinkClick: (link: string) => void; getContainer?: () => HTMLElement; onAnchorEnter: (link: string) => void; onAnchorLeave?: (link: string) => void; registerAnchor: (link: string, element: HTMLElement) => void; unRegisterAnchor: (link: string) => void; } export const ElevatorContext = createContext<IElevatorContextProps>( {} as IElevatorContextProps );