zent
Version:
一套前端设计语言和基于React的实现
12 lines (11 loc) • 499 B
JavaScript
import { __assign } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import { useMemo } from 'react';
import { IMECompositionContext } from './context';
export var IMEComposition = function (_a) {
var _b = _a.enable, enable = _b === void 0 ? true : _b, children = _a.children;
var ctx = useMemo(function () { return ({
enable: enable,
}); }, [enable]);
return (_jsx(IMECompositionContext.Provider, __assign({ value: ctx }, { children: children }), void 0));
};