mirror of
https://github.com/colanode/colanode.git
synced 2025-12-16 11:47:47 +01:00
16 lines
416 B
TypeScript
16 lines
416 B
TypeScript
import { createContext, useContext } from 'react';
|
|
|
|
export type ContainerType = 'full' | 'modal';
|
|
|
|
interface ContainerContext {
|
|
type: ContainerType;
|
|
scrollAreaRef: React.RefObject<HTMLDivElement>;
|
|
scrollViewportRef: React.RefObject<HTMLDivElement>;
|
|
}
|
|
|
|
export const ContainerContext = createContext<ContainerContext>(
|
|
{} as ContainerContext
|
|
);
|
|
|
|
export const useContainer = () => useContext(ContainerContext);
|