Files
klz-cables.com/.pnpm-store/v10/files/20/b6e73137bc89444cd853c7fe4fc8d0c425ed1dd5e9c8c1e33dfe42121f32718b07f4a915dc1d9f5d9278d9a070138330abd7110cbd30746ba707b83e3dd9fd
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

29 lines
1.4 KiB
Plaintext

import React from 'react';
/**
* Creates a higher-order component (HOC) that merges predefined properties (`toMergeIntoProps`)
* with any properties passed to the resulting component.
*
* Use this when you want to pre-specify some props for a component, while also allowing users to
* pass in their own props. The HOC ensures the passed props and predefined props are combined before
* rendering the original component.
*
* @example
* const PredefinedComponent = getMergedPropsComponent({
* Component: OriginalComponent,
* toMergeIntoProps: { someExtraValue: 5 }
* });
* // Using <PredefinedComponent customProp="value" /> will result in
* // <OriginalComponent customProp="value" someExtraValue={5} />
*
* @returns A higher-order component with combined properties.
*
* @param Component - The original component to wrap.
* @param sanitizeServerOnlyProps - If true, server-only props will be removed from the merged props. @default true if the component is not a server component, false otherwise.
* @param toMergeIntoProps - The properties to merge into the passed props.
*/
export declare function withMergedProps<ToMergeIntoProps, CompleteReturnProps>({ Component, sanitizeServerOnlyProps, toMergeIntoProps, }: {
Component: React.FC<CompleteReturnProps>;
sanitizeServerOnlyProps?: boolean;
toMergeIntoProps: ToMergeIntoProps;
}): React.FC<CompleteReturnProps>;
//# sourceMappingURL=index.d.ts.map