packageDocumentation module import * as React from "react" ; internal export const flattenChildren = ( children ) : React . ReactNode => { const items = React . Children . map ( children , ( child ) => { if ( ! React . isValidElement < { children ? : React . ReactNode ; } > ( child ) ) return child ; if ( child . type === React . Fragment ) { return child . props . children ; } return child ; } ) ; return items ; } ;