Skip to content

Commit 7090e94

Browse files
committed
fixes
1 parent 8c8c611 commit 7090e94

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

dist/types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type ScrollObjectProperties = {
1111
};
1212
export type Timeout = number | null;
1313
export type ScrollingElement = HTMLElement | null | undefined;
14-
export type Children = ((props: ScrollDataChildren | ScrollObject) => React.ReactNode) | {
14+
export type Children = ((props: ScrollDataChildren | ScrollObject) => unknown) | {
1515
children: React.ReactNode;
1616
} | unknown;
1717
export interface ScrollDataBase {

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/scroll-trackers/ScrollTracker.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ const childrenAsMethod = (children: Children, scrollObject: ScrollTrackerObject
1111
return children;
1212
};
1313

14+
// const childrenAsMethod = (children: Children, scrollObject: ScrollTrackerObject = emptyScrollObject) =>
15+
// typeof children === 'function' ? children({ scrollObject, children }) : children;
16+
1417
export const ScrollTracker = memo(({ scrollData, children, elem, settings, onStart, onEnd }: ScrollTrackerProps) => {
1518
const { trigger = defaultConfig.trigger, offsetTop, offsetBottom, duration } = settings;
1619

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export type Timeout = number | null;
1515
export type ScrollingElement = HTMLElement | null | undefined;
1616

1717
export type Children =
18-
| ((props: ScrollDataChildren | ScrollObject) => React.ReactNode)
18+
| ((props: ScrollDataChildren | ScrollObject) => unknown)
1919
| {
2020
children: React.ReactNode;
2121
}

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"module": "ESNext",
77
"skipLibCheck": true,
88
"outDir": "dist",
9-
"declaration": true,
109

1110
/* Bundler mode */
1211
"moduleResolution": "bundler",

0 commit comments

Comments
 (0)