indicator-ui 0.0.154 → 0.0.155
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ReactNode, Ref } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* Триггер события скролла, может быть,
|
|
4
4
|
* либо значением отступа скролла от верха компонента
|
|
@@ -31,4 +31,13 @@ export type ScrollProviderPropsType = {
|
|
|
31
31
|
* По умолчанию: *10* _(10px)_.
|
|
32
32
|
* */
|
|
33
33
|
accuracy?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Компонент обертка, скролл которого будет отслеживаться.
|
|
36
|
+
*
|
|
37
|
+
* **Warning:** у компонента есть обязательные _пропсы_: `ref`, `children`
|
|
38
|
+
* */
|
|
39
|
+
wrapper?: React.ReactElement<{
|
|
40
|
+
children?: ReactNode;
|
|
41
|
+
ref: Ref<HTMLElement>;
|
|
42
|
+
}>;
|
|
34
43
|
};
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
import { ScrollProviderPropsType } from "../types";
|
|
2
|
-
|
|
2
|
+
import React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Компонент для отслеживания скролла в разных обстоятельствах.
|
|
5
|
+
* */
|
|
6
|
+
export declare function ScrollProvider({ onScroll, onScrollTop, onScrollBottom, children, accuracy, wrapper, }: ScrollProviderPropsType): React.ReactElement<{
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
ref: React.Ref<HTMLElement>;
|
|
9
|
+
}, string | React.JSXElementConstructor<any>>;
|