@kids-reporter/draft-renderer 0.2.0 → 0.2.1
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/lib/block-renderer-fn.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.atomicBlockRenderer = atomicBlockRenderer;
|
|
|
8
8
|
var _blockRenderers = require("./block-renderers");
|
|
9
9
|
|
|
10
10
|
const {
|
|
11
|
-
|
|
11
|
+
EmbeddedCodeInArticleBody,
|
|
12
12
|
ImageInArticleBody,
|
|
13
13
|
InfoBoxBlock,
|
|
14
14
|
SlideshowInArticleBody
|
|
@@ -36,7 +36,7 @@ const AtomicBlock = props => {
|
|
|
36
36
|
|
|
37
37
|
case 'EMBEDDEDCODE':
|
|
38
38
|
{
|
|
39
|
-
return
|
|
39
|
+
return EmbeddedCodeInArticleBody({
|
|
40
40
|
data: entityData
|
|
41
41
|
});
|
|
42
42
|
}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.EmbeddedCodeBlock = exports.Caption = exports.Block = void 0;
|
|
7
|
+
exports.EmbeddedCodeInArticleBody = EmbeddedCodeInArticleBody;
|
|
7
8
|
|
|
8
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
10
|
|
|
@@ -114,4 +115,19 @@ const EmbeddedCodeBlock = ({
|
|
|
114
115
|
}), caption && /*#__PURE__*/_react.default.createElement(Caption, null, caption));
|
|
115
116
|
};
|
|
116
117
|
|
|
117
|
-
exports.EmbeddedCodeBlock = EmbeddedCodeBlock;
|
|
118
|
+
exports.EmbeddedCodeBlock = EmbeddedCodeBlock;
|
|
119
|
+
const ArticleBodyContainer = _styledComponents.default.div`
|
|
120
|
+
max-width: 700px;
|
|
121
|
+
margin: 0 auto 27px auto;
|
|
122
|
+
`;
|
|
123
|
+
|
|
124
|
+
function EmbeddedCodeInArticleBody({
|
|
125
|
+
className = '',
|
|
126
|
+
data
|
|
127
|
+
}) {
|
|
128
|
+
return /*#__PURE__*/_react.default.createElement(ArticleBodyContainer, {
|
|
129
|
+
className: className
|
|
130
|
+
}, /*#__PURE__*/_react.default.createElement(EmbeddedCodeBlock, {
|
|
131
|
+
data: data
|
|
132
|
+
}));
|
|
133
|
+
}
|
|
@@ -15,6 +15,7 @@ var _slideshowBlock = require("./slideshow-block");
|
|
|
15
15
|
|
|
16
16
|
const blockRenderers = {
|
|
17
17
|
EmbeddedCodeBlock: _embeddedCodeBlock.EmbeddedCodeBlock,
|
|
18
|
+
EmbeddedCodeInArticleBody: _embeddedCodeBlock.EmbeddedCodeInArticleBody,
|
|
18
19
|
ImageBlock: _imageBlock.ImageBlock,
|
|
19
20
|
ImageInArticleBody: _imageBlock.ImageInArticleBody,
|
|
20
21
|
InfoBoxBlock: _infoBoxBlock.InfoBoxBlock,
|