@contentful/experiences-components-react 3.5.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2143,17 +2143,15 @@ const stopEventPropagation = (event) => {
|
|
|
2143
2143
|
/* eslint-disable */
|
|
2144
2144
|
const ContentfulContainer = (props) => {
|
|
2145
2145
|
// Extract hyperlink-related props to not pass them to the regular container
|
|
2146
|
-
const { className, isEditorMode, children, cfHyperlink, cfOpenInNewTab, ...otherProps } = props;
|
|
2146
|
+
const { className, isEditorMode, isEmpty, nodeBlockId, children, cfHyperlink, cfOpenInNewTab, ...otherProps } = props;
|
|
2147
2147
|
if (cfHyperlink) {
|
|
2148
2148
|
return React.createElement(ContentfulContainerAsHyperlink, { ...props }, children);
|
|
2149
2149
|
}
|
|
2150
2150
|
if (!isEditorMode) {
|
|
2151
2151
|
return (React.createElement(Flex, { "data-test-id": "contentful-container", ...extractRenderProps(otherProps), className: combineClasses(className, 'contentful-container') }, children));
|
|
2152
2152
|
}
|
|
2153
|
-
// Extract properties that are only available in editor mode
|
|
2154
|
-
const { isEmpty, nodeBlockId } = props;
|
|
2155
2153
|
const isSection = nodeBlockId === CONTENTFUL_COMPONENTS$1.section.id;
|
|
2156
|
-
return (React.createElement(Flex, { "data-test-id": "contentful-container", ...extractRenderProps(
|
|
2154
|
+
return (React.createElement(Flex, { "data-test-id": "contentful-container", ...extractRenderProps(otherProps), className: combineClasses(className, 'contentful-container', isEmpty ? (isSection ? 'contentful-section-label' : 'contentful-container-label') : '') }, children));
|
|
2157
2155
|
};
|
|
2158
2156
|
|
|
2159
2157
|
const containerDefinition = {
|