import React from "react"

export function jsxTextContent(children) {
  if(!children) return ""
  return React.Children.map(children, (child) => {
    if (typeof child === "string") return child
    if (child.props.children) return jsxTextContent(child.props.children)
    return ""
  }).join("")
}
