UNPKG

@base-ui-components/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

18 lines 532 B
import * as React from 'react'; import { mergeReactProps } from '../../utils/mergeReactProps.js'; export function usePreviewCardPopup(params) { const { getProps } = params; const getPopupProps = React.useCallback((externalProps = {}) => { return mergeReactProps(getProps(externalProps), { style: { // <Popover.Arrow> must be relative to the <Popover.Popup> element. position: 'relative' } }); }, [getProps]); return React.useMemo(() => ({ getPopupProps }), [getPopupProps]); }