UNPKG

@gravity-ui/uikit

Version:

Gravity UI base styling and components

14 lines (13 loc) 658 B
'use client'; import { jsx as _jsx } from "react/jsx-runtime"; import * as React from 'react'; import { useUniqId } from "../../hooks/index.js"; import { useDefaultProps } from "../theme/useDefaultProps.js"; import { TabContext } from "./contexts/TabContext.js"; export const TabProvider = (rawProps) => { const { value, onUpdate, children } = useDefaultProps('TabProvider', rawProps); const id = useUniqId(); const contextValue = React.useMemo(() => ({ value, onUpdate, id, isProvider: true }), [value, onUpdate, id]); return _jsx(TabContext.Provider, { value: contextValue, children: children }); }; //# sourceMappingURL=TabProvider.js.map