UNPKG

quantumai-design-system

Version:

퀀텀에이아이의 디자인 시스템

9 lines (8 loc) 296 B
import { isValidElement } from 'react'; export var ChildName = function (child) { if (isValidElement(child) && typeof child.type !== 'string') { var componentType = child.type; return componentType.displayName || componentType.name || 'Component'; } return 'Node'; };