choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
30 lines (29 loc) • 967 B
TypeScript
import React, { CSSProperties, PureComponent } from 'react';
import ConfigContext, { ConfigContextValue } from '../config-provider/ConfigContext';
export interface BackTopProps {
visibilityHeight?: number;
onClick?: React.MouseEventHandler<HTMLElement>;
target?: () => HTMLElement | Window;
prefixCls?: string;
className?: string;
style?: CSSProperties;
visible?: boolean;
}
export default class BackTop extends PureComponent<BackTopProps, any> {
static displayName: string;
static get contextType(): typeof ConfigContext;
static defaultProps: {
visibilityHeight: number;
};
context: ConfigContextValue;
scrollEvent: any;
state: {
visible: boolean;
};
componentDidMount(): void;
componentWillUnmount(): void;
scrollToTop: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
setScrollTop(value: number): void;
handleScroll: () => void;
render(): JSX.Element;
}