@ducor/react
Version:
admin template ui interface
10 lines (9 loc) • 330 B
JavaScript
import { createContext, useContext } from 'react';
export const ScrollAreaContext = createContext(undefined);
export const useScrollArea = () => {
const context = useContext(ScrollAreaContext);
if (!context) {
throw new Error('useScrollArea must be used within a ScrollAreaProvider');
}
return context;
};