MCPcopy Create free account
hub / github.com/bootstrap-styled/bootstrap-styled / getDisplayName

Function getDisplayName

src/utils/getDisplayName.js:13–23  ·  view source on GitHub ↗
(Component)

Source from the content-addressed store, hash-verified

11}
12
13function getDisplayName(Component) {
14 if (typeof Component === 'string') {
15 return Component;
16 }
17
18 if (!Component) {
19 return undefined;
20 }
21
22 return Component.displayName || Component.name || getFunctionName(Component) || 'Component';
23}
24
25export default getDisplayName;

Callers 3

withWidthFunction · 0.85
AndAnotherComponentFunction · 0.85

Calls 1

getFunctionNameFunction · 0.85

Tested by 1

AndAnotherComponentFunction · 0.68