@intility/bifrost-react
Version:
React library for Intility's design system, Bifrost.
12 lines (11 loc) • 509 B
TypeScript
/**
* Wraps a client component as a server component, so that submodules can be assigned to it
* @param ClientComponent the component to wrap (function reference)
* @param displayName name of the ClientComponent (string)
* @returns A Server Component with the same type signature as the input component
* @example
* Object.assign(wrapClientComponent(Dropdown, "Dropdown"), {
* Item: DropdownItem,
* });
*/
export declare function wrapClientComponent<T>(ClientComponent: T, displayName: string): T;