UNPKG

@gravity-ui/uikit

Version:

Gravity UI base styling and components

17 lines (16 loc) 772 B
'use client'; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TabProvider = void 0; const tslib_1 = require("tslib"); const jsx_runtime_1 = require("react/jsx-runtime"); const React = tslib_1.__importStar(require("react")); const hooks_1 = require("../../hooks/index.js"); const TabContext_1 = require("./contexts/TabContext.js"); const TabProvider = ({ value, onUpdate, children }) => { const id = (0, hooks_1.useUniqId)(); const contextValue = React.useMemo(() => ({ value, onUpdate, id, isProvider: true }), [value, onUpdate, id]); return (0, jsx_runtime_1.jsx)(TabContext_1.TabContext.Provider, { value: contextValue, children: children }); }; exports.TabProvider = TabProvider; //# sourceMappingURL=TabProvider.js.map