UNPKG

@synergycodes/axiom

Version:

A React library for creating node-based UIs and diagram-driven applications. Perfect for React Flow users, providing ready-to-use node templates and components that work seamlessly with React Flow's ecosystem.

17 lines (16 loc) 981 B
import { MenuButtonProps } from '@mui/base'; import { ForwardRefExoticComponent, ReactElement, RefAttributes } from 'react'; /** * A helper function to simplify the creation of a menu trigger button. * It automatically assigns `props` and `ref` to the given `component`. * To optimize performance, it caches the cloned element and only clones it again * when the `component` or its `ref` changes. */ export declare function createTriggerButton(component: ReactElement): ForwardRefExoticComponent<MenuButtonProps & RefAttributes<unknown>>; /** * Determines if a given React component is a forward-ref component. * The function checks if the component or any of its nested types * is wrapped in `forwardRef`. It recursively traverses through the component's * `type` to handle cases where the component may be memoized or wrapped multiple times. */ export declare function isForwardRefComponent<T>(component: any): component is ForwardRefExoticComponent<RefAttributes<T>>;