zent
Version:
一套前端设计语言和基于React的实现
12 lines (11 loc) • 321 B
JavaScript
import { createContext, useContext } from 'react';
var context = createContext(null);
context.displayName = 'ZentPopoverContext';
export function usePopoverContext() {
var ctx = useContext(context);
if (!ctx) {
throw new Error('Popover context not found');
}
return ctx;
}
export default context;