UNPKG

antd

Version:

An enterprise-class UI design language and React components implementation

14 lines (13 loc) 362 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = useChildren; var _util = require("@rc-component/util"); function useChildren(children) { if (typeof children === 'function') { return children; } const childList = (0, _util.toArray)(children); return childList.length <= 1 ? childList[0] : childList; }