UNPKG

@scrolia/react-native

Version:
35 lines 1.43 kB
import { CompleteOptions } from "../@types/options.js"; import * as React from "react"; /** Options for the `ScrollCore` context. */ type ScrollCoreOptions = CompleteOptions; /** Content type. */ type ContentType = "scrollview" | "flatlist"; /** States for the `ScrollCore` context. */ type ScrollCoreStates = { contentType: React.RefObject<ContentType>; contentRef: React.RefObject<any | null>; hvTrack: boolean; setHvTrack: React.Dispatch<React.SetStateAction<boolean>>; hvThumb: boolean; setHvThumb: React.Dispatch<React.SetStateAction<boolean>>; total: React.RefObject<number>; view: React.RefObject<number>; viewOffset: React.RefObject<number>; scrollbarLength: number; setScrollbarLength: React.Dispatch<React.SetStateAction<number>>; scrollbarOffset: number; setScrollbarOffset: React.Dispatch<React.SetStateAction<number>>; }; declare const useScrollCoreStates: () => ScrollCoreStates; /** Core for internal logic. */ type ScrollCore = { options: ScrollCoreOptions; x: ScrollCoreStates; y: ScrollCoreStates; }; /** `ScrollCore` context. */ declare const ScrollCoreContext: React.Context<ScrollCore | null>; /** Hook for using the `ScrollCore` context. */ declare const useScrollCore: () => ScrollCore; export { type ContentType, type ScrollCore, ScrollCoreContext, type ScrollCoreOptions, type ScrollCoreStates, useScrollCore, useScrollCoreStates }; //# sourceMappingURL=scrollcore.d.ts.map