package.dist.components.tooltip.tooltip-root-provider.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of react Show documentation
Show all versions of react Show documentation
A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.
The newest version!
'use client';
import { jsx } from 'react/jsx-runtime';
import { mergeProps } from '@zag-js/react';
import { splitPresenceProps } from '../presence/split-presence-props.js';
import { usePresence } from '../presence/use-presence.js';
import { PresenceProvider } from '../presence/use-presence-context.js';
import { TooltipProvider } from './use-tooltip-context.js';
const TooltipRootProvider = (props) => {
const [presenceProps, { value: tooltip, children }] = splitPresenceProps(props);
const presence = usePresence(mergeProps({ present: tooltip.open }, presenceProps));
return /* @__PURE__ */ jsx(TooltipProvider, { value: tooltip, children: /* @__PURE__ */ jsx(PresenceProvider, { value: presence, children }) });
};
export { TooltipRootProvider };
© 2015 - 2025 Weber Informatics LLC | Privacy Policy