import React, { ReactNode } from 'react'; export const getSlotInfo = (child: ReactNode) => { if (!React.isValidElement(child)) return null; return { displayName: child.type?.displayName, typeName: typeof child.type === 'string' ? child.type : child.type?.name, isNativeElement: typeof child.type === 'string', }; };