mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
084490ba6b
* Add rules * codemod: update-react-imports * Update babelrc
16 lines
374 B
TypeScript
16 lines
374 B
TypeScript
import { createContext, useContext } from "react";
|
|
|
|
/**
|
|
* Context to provide a reference to the scrollable container
|
|
*/
|
|
const ScrollContext = createContext<
|
|
React.RefObject<HTMLDivElement> | undefined
|
|
>(undefined);
|
|
|
|
/**
|
|
* Hook to get the scrollable container reference
|
|
*/
|
|
export const useScrollContext = () => useContext(ScrollContext);
|
|
|
|
export default ScrollContext;
|