(_displayName, parentComponentId)
| 21381 | |
| 21382 | /* We depend on components having unique IDs */ |
| 21383 | var generateId = function generateId(_displayName, parentComponentId) { |
| 21384 | var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName); |
| 21385 | |
| 21386 | var componentId = void 0; |
| 21387 | |
| 21388 | /** |
| 21389 | * only fall back to hashing the component injection order if |
| 21390 | * a proper displayName isn't provided by the babel plugin |
| 21391 | */ |
| 21392 | if (!_displayName) { |
| 21393 | var nr = (identifiers[displayName] || 0) + 1; |
| 21394 | identifiers[displayName] = nr; |
| 21395 | |
| 21396 | componentId = displayName + '-' + ComponentStyle.generateName(displayName + nr); |
| 21397 | } else { |
| 21398 | componentId = displayName + '-' + ComponentStyle.generateName(displayName); |
| 21399 | } |
| 21400 | |
| 21401 | return parentComponentId !== undefined ? parentComponentId + '-' + componentId : componentId; |
| 21402 | }; |
| 21403 | |
| 21404 | var BaseStyledComponent = function (_Component) { |
| 21405 | inherits(BaseStyledComponent, _Component); |
no test coverage detected