@docere/text-components
Advanced tools
Comparing version
{ | ||
"name": "@docere/text-components", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "src/index.tsx", |
@@ -25,3 +25,3 @@ { | ||
], | ||
"files": ["./src/index.tsx"] | ||
"files": ["./src/index.tsx", "../common/src/global.d.ts"] | ||
} |
import React from 'react'; | ||
import styled, { css } from 'styled-components'; | ||
import { EntrySettingsContext, EntitiesContext, useUIComponent, UIComponentType, ContainerContext, DispatchContext, EntryContext } from '@docere/common'; | ||
import { EntrySettingsContext, EntitiesContext, useUIComponent, UIComponentType, ContainerContext, DispatchContext, EntryContext, DTAP } from '@docere/common'; | ||
import { useChildren } from './hooks'; | ||
@@ -71,4 +71,6 @@ import IconsByType from './icons'; | ||
if (entity == null) { | ||
console.error(`[DOCERE] Entity '${props.annotation.props.entityId}' not found`, props.annotation); | ||
return null; | ||
if (DOCERE_DTAP === DTAP.Development) { | ||
console.error(`[DOCERE] Entity '${props.annotation.props.entityId}' not found`, props.annotation); | ||
} | ||
return React.createElement("span", null, props.children); | ||
} | ||
@@ -75,0 +77,0 @@ const Icon = IconsByType[entity.props.entityConfig.type]; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
60958
1.73%914
0.44%