rdesign/frontend/node_modules/@copilotkitnext/react/dist/lib/slots.d.mts

13 lines
605 B
TypeScript

import React from "react";
//#region src/lib/slots.d.ts
/** Existing union (unchanged) */
type SlotValue<C extends React.ComponentType<any>> = C | string | Partial<React.ComponentProps<C>>;
/** Utility: concrete React elements for every slot */
type SlotElements<S> = { [K in keyof S]: React.ReactElement };
type WithSlots<S extends Record<string, React.ComponentType<any>>, Rest = {}> = { [K in keyof S]?: SlotValue<S[K]> } & {
children?: (props: SlotElements<S> & Rest) => React.ReactNode;
} & Omit<Rest, "children">;
//#endregion
export { SlotValue, WithSlots };
//# sourceMappingURL=slots.d.mts.map