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.

14 lines (13 loc) 882 B
import type * as React from 'react'; import type { WithBaseUIEvent } from './types.js'; /** * Merges multiple sets of React props such that their event handlers are called in sequence (the user's * before our internal ones), and allows the user to prevent the internal event handlers from being * executed by attaching a `preventBaseUIHandler` method. It also merges the `style` prop, whereby * the user's styles overwrite the internal ones. * @important **`className` and `ref` are not merged.** * @param externalProps the user's external props. * @param internalProps our own internal props. * @returns the merged props. */ export declare function mergeReactProps<T extends React.ElementType>(externalProps: WithBaseUIEvent<React.ComponentPropsWithRef<T>> | undefined, ...internalProps: React.ComponentPropsWithRef<T>[]): WithBaseUIEvent<React.ComponentPropsWithRef<T>>;