UNPKG

react-semantic-render

Version:

Semantic helper components for rendering content with React.

2 lines (1 loc) 408 B
"use strict";var e=require("./getRenderMethod-d34dcf5d.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=r(require("react"));function n(r){return e.isFunction(r)?r.call():(n=r,0!==t.default.Children.count(n)&&t.default.isValidElement(r)?t.default.Children.only(r):"string"==typeof r?r:null);var n}exports.render=function(r){return n(e.getRenderMethod(r.children,r.render))};