UNPKG

@chakra-ui/react

Version:

Responsive and accessible React UI components built with React and Emotion

24 lines (21 loc) 829 B
"use strict"; 'use strict'; function getElementTypeDisplayName(Component) { if (typeof Component === "string") return void 0; return Component.displayName || Component.name; } function upperFirst(str) { if (!str) return str; return str.charAt(0).toUpperCase() + str.slice(1); } function inferSlotRecipeComponentDisplayName(contextName, slot) { return contextName + upperFirst(slot); } function inferRootProviderDisplayName(contextName, innerDisplayNameOrName) { if (!innerDisplayNameOrName) return void 0; return contextName + upperFirst(innerDisplayNameOrName); } exports.getElementTypeDisplayName = getElementTypeDisplayName; exports.inferRootProviderDisplayName = inferRootProviderDisplayName; exports.inferSlotRecipeComponentDisplayName = inferSlotRecipeComponentDisplayName; exports.upperFirst = upperFirst;