UNPKG

eip-components-web

Version:
19 lines 818 B
import { Context, PropsWithChildren } from 'react'; export type ScrollToState = { scrollViewRef: { current: any; }; scrollToElementRef: { current: any; }; scrollToElement: () => void; updateScrollToElement: () => void; }; export type ScrollToContextValue<ScrollId extends string> = Record<ScrollId, ScrollToState>; export declare const ScrollToContext: Context<ScrollToContextValue<any>>; export declare const ScrollToProvider: <ScrollId extends string>({ children, scrollToIds, fallback, }: PropsWithChildren<{ scrollToIds: ScrollId[]; fallback?: () => void; }>) => import("react/jsx-runtime").JSX.Element; export declare const useScrollState: <ScrollId extends string>(name: ScrollId) => ScrollToContextValue<ScrollId>[ScrollId]; //# sourceMappingURL=scrollTo.d.ts.map