@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
17 lines (16 loc) • 531 B
JavaScript
'use client';
import { createContext, memo, use } from 'react';
import { jsx as _jsx } from "react/jsx-runtime";
export var IconContext = /*#__PURE__*/createContext({});
export var IconProvider = /*#__PURE__*/memo(function (_ref) {
var children = _ref.children,
_ref$config = _ref.config,
config = _ref$config === void 0 ? {} : _ref$config;
return /*#__PURE__*/_jsx(IconContext, {
value: config,
children: children
});
});
export var useIconContext = function useIconContext() {
return use(IconContext);
};