UNPKG

yantd

Version:

React component library

27 lines (26 loc) 866 B
import React, { FC } from "react"; import { AnchorContainer } from "./type"; export interface AnchorProps { Link: any; prefixCls?: string; className?: string; style?: React.CSSProperties; children?: React.ReactNode; offsetTop?: number; bounds?: number; affix?: boolean; showInkInFixed?: boolean; getContainer?: () => AnchorContainer; /** Return customize highlight anchor */ getCurrentAnchor?: () => string; onClick?: (e: React.MouseEvent<HTMLElement>, link: { title: React.ReactNode; href: string; }) => void; /** Scroll to target offset value, if none, it's offsetTop prop value or 0. */ targetOffset?: number; /** Listening event when scrolling change active link */ onChange?: (currentActiveLink: string) => void; } declare const Main: FC<AnchorProps>; export default Main;