import { ReactNode } from "react" ; import { isFragment } from "react-is" ; import { isFunction } from "./assertions" ; export function resolveFragment ( children ) { if ( isFragment ( children ) ) { return children . props . children ; } return children ; } export function resolveChildren ( children , renderProps ? ) { if ( isFunction ( children ) ) { return resolveFragment ( children ( renderProps ) ) ; } return resolveFragment ( children ) ; }