diff --git a/apps/demo/src/components/infinite-list-with-reverse-horizontal-scroll.tsx b/apps/demo/src/components/infinite-list-with-reverse-horizontal-scroll.tsx index 681f358..fc2b43e 100644 --- a/apps/demo/src/components/infinite-list-with-reverse-horizontal-scroll.tsx +++ b/apps/demo/src/components/infinite-list-with-reverse-horizontal-scroll.tsx @@ -14,7 +14,7 @@ export function InfiniteListWithReverseHozirontalScroll() { rootMargin: '0px 0px 0px 400px', }); - const scrollableRootRef = useRef | null>(null); + const scrollableRootRef = useRef | null>(null); const lastScrollDistanceToRightRef = useRef(); const reversedItems = useMemo(() => [...items].reverse(), [items]); diff --git a/apps/demo/src/components/infinite-list-with-reverse-vertical-scroll.tsx b/apps/demo/src/components/infinite-list-with-reverse-vertical-scroll.tsx index ffcde95..b27926c 100644 --- a/apps/demo/src/components/infinite-list-with-reverse-vertical-scroll.tsx +++ b/apps/demo/src/components/infinite-list-with-reverse-vertical-scroll.tsx @@ -14,7 +14,7 @@ export function InfiniteListWithReverseVerticalScroll() { rootMargin: '400px 0px 0px 0px', }); - const scrollableRootRef = useRef | null>(null); + const scrollableRootRef = useRef | null>(null); const lastScrollDistanceToBottomRef = useRef(); const reversedItems = useMemo(() => [...items].reverse(), [items]); diff --git a/apps/demo/src/components/list.tsx b/apps/demo/src/components/list.tsx index 7d90719..fdeaf43 100644 --- a/apps/demo/src/components/list.tsx +++ b/apps/demo/src/components/list.tsx @@ -1,7 +1,8 @@ import { forwardRef } from 'react'; -type ListProps = React.PropsWithChildren & { +type ListProps = { direction?: 'vertical' | 'horizontal'; + children: React.ReactNode; }; export function List({ direction, ...rest }: ListProps) { @@ -13,9 +14,11 @@ export function List({ direction, ...rest }: ListProps) { ); } -type ListItemProps = React.PropsWithChildren; +type ListItemProps = { + children: React.ReactNode; +}; -export const ListItem = forwardRef, ListItemProps>( +export const ListItem = forwardRef, ListItemProps>( function ListItem(props, ref) { return
  • ; },