import * as React from 'react'; /** * Immutably override props of the children of the original component and (optionally) the original component * * @since v2.3.0 * @param {React.ReactElement} component - The component whose children you want to modify * @param {(child: T, index?: number) => object} getChildOverrides - Callback function that returns an object containing the props you wish to override for each child * @param {object} [overrides] - Any other props to override on the original component * @returns {React.ReactElement} The original component with the children with modified prop values * @example * * // This will override the active prop for each child component to {true} * overrideProps(component, () => ({ active: true })); * * // This will override the active prop for each child component to {true} where child has a title prop = 'Supervisor' * overrideProps(component, child => child.props.title === 'Supervisor' ? ({ active: true }) : {}); * * // This will override the active prop for each child component to {true} and override the hello prop on the root component * overrideProps(component, () => ({ active: true }), { hello: 'Hola mundo' }); */ export declare const overrideProps: (component: React.ReactElement, getChildOverrides: (child: T, index?: number) => Record, overrides?: Record) => React.ReactElement; /** * Immutably override props of the children and all descendants (deep) * * @since v2.10.0 * @param {T} children - JSX children * @param {(child: T) => object} getChildOverrides - Callback function that returns an object containing the props you wish to override for each child * @returns {TC[]} - All children with modified prop values * @example * * // This will override the active prop for each child component to {true} * overridePropsDeep(children, () => ({ active: true })); * * // This will override the active prop for each child component to {true} where child has a title prop = 'Supervisor' * overridePropsDeep(children, child => child.props.title === 'Supervisor' ? ({ active: true }) : {}); */ export declare const overridePropsDeep: (children: T, getChildOverrides: (child: TC) => Record) => TC[];