File tree 1 file changed +8
-1
lines changed
packages/react-back-top/src
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,13 @@ import { IProps, HTMLDivProps } from '@uiw/utils';
3
3
import { getScrollPercent , getScrollTop , scrollToAnimate } from './utils' ;
4
4
import './style/index.less' ;
5
5
6
- export interface BackTopProps extends IProps , HTMLDivProps {
6
+ export interface ChildrenFunction {
7
+ scrollToTop : ( ) => void ;
8
+ percent : number ;
9
+ current : number ;
10
+ }
11
+
12
+ export interface BackTopProps extends IProps , Omit < HTMLDivProps , 'children' > {
7
13
offsetTop ?: number ;
8
14
clickable ?: boolean ;
9
15
content ?: JSX . Element | string ;
@@ -13,6 +19,7 @@ export interface BackTopProps extends IProps, HTMLDivProps {
13
19
*/
14
20
showBelow ?: number ;
15
21
speed ?: number ;
22
+ children ?: React . ReactNode | ( ( props : ChildrenFunction ) => React . ReactNode ) ;
16
23
}
17
24
18
25
export interface IBackTopState {
You can’t perform that action at this time.
0 commit comments