/** * * This file may have been modified by Bytedance Inc. (“Bytedance Inc.'s Modifications”). * All Bytedance Inc.'s Modifications are Copyright (year) Bytedance Inc.. * * This source code is licensed under the Apache license. * See LICENSE file in the project root for license information. * */ import * as React from 'react'; import { ConfigConsumerProps } from '../../config-provider'; export interface AffixProps { offsetTop?: number; offsetBottom?: number; style?: React.CSSProperties; onChange?: (affixed?: boolean) => void; target?: () => Window | HTMLElement | null; prefixCls?: string; className?: string; children: React.ReactNode; } declare enum AffixStatus { None = 0, Prepare = 1 } export interface AffixState { affixStyle?: React.CSSProperties; placeholderStyle?: React.CSSProperties; status: AffixStatus; lastAffix: boolean; prevTarget: Window | HTMLElement | null; } declare class Affix extends React.Component { static contextType: React.Context; state: AffixState; placeholderNode: HTMLDivElement; fixedNode: HTMLDivElement; private timeout; context: ConfigConsumerProps; private getTargetFunc; componentDidMount(): void; componentDidUpdate(prevProps: AffixProps): void; componentWillUnmount(): void; getOffsetTop: () => number | undefined; getOffsetBottom: () => number | undefined; savePlaceholderNode: (node: HTMLDivElement) => void; saveFixedNode: (node: HTMLDivElement) => void; measure: () => void; prepareMeasure: () => void; updatePosition(): void; lazyUpdatePosition(): void; render: () => JSX.Element; } export default Affix;