@twreporter/react-article-components 2.2.0-rc.0 → 2.2.0-rc.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/CHANGELOG.md +8 -0
- package/lib/components/article-page.js +39 -108
- package/lib/components/aside/desktop-aside.js +25 -65
- package/lib/components/aside/desktop-tools.js +11 -57
- package/lib/components/aside/metadata.js +22 -89
- package/lib/components/aside/mobile-tool-bar.js +79 -175
- package/lib/components/aside/utils/theme.js +5 -11
- package/lib/components/body/annotation.js +15 -73
- package/lib/components/body/audio/audio-contexts.js +4 -16
- package/lib/components/body/audio/audio-provider.js +13 -48
- package/lib/components/body/audio/control-button.js +4 -28
- package/lib/components/body/audio/index.js +10 -56
- package/lib/components/body/audio/seek-bar.js +6 -23
- package/lib/components/body/audio/time.js +0 -6
- package/lib/components/body/blockquote.js +11 -52
- package/lib/components/body/brief.js +10 -55
- package/lib/components/body/centered-quote.js +10 -52
- package/lib/components/body/embedded-code.js +22 -101
- package/lib/components/body/headings.js +6 -23
- package/lib/components/body/image-diff.js +13 -66
- package/lib/components/body/image.js +11 -46
- package/lib/components/body/index.js +21 -118
- package/lib/components/body/infobox.js +13 -58
- package/lib/components/body/list.js +8 -29
- package/lib/components/body/multimedia.js +10 -29
- package/lib/components/body/paragraph.js +5 -23
- package/lib/components/body/slider/index.js +28 -96
- package/lib/components/body/slideshow/index.js +36 -107
- package/lib/components/body/tracking-section.js +7 -46
- package/lib/components/body/youtube.js +8 -41
- package/lib/components/donation-box.js +10 -44
- package/lib/components/img-with-placeholder/index.js +34 -106
- package/lib/components/leading/extend.js +6 -25
- package/lib/components/leading/fullscreen.js +17 -63
- package/lib/components/leading/index.js +2 -10
- package/lib/components/leading/normal.js +19 -64
- package/lib/components/leading/pink.js +20 -59
- package/lib/components/leading/small.js +6 -25
- package/lib/components/license.js +9 -40
- package/lib/components/link.js +8 -37
- package/lib/components/related/card.js +20 -73
- package/lib/components/related/index.js +25 -71
- package/lib/components/related/list.js +16 -70
- package/lib/components/related/mockup.js +10 -12
- package/lib/components/separation-curve.js +0 -15
- package/lib/components/table-of-contents/index.js +17 -46
- package/lib/components/table-of-contents/styled.js +10 -38
- package/lib/constants/anchor.js +4 -8
- package/lib/constants/css.js +2 -15
- package/lib/constants/element-alignment.js +2 -3
- package/lib/constants/prop-types/article-page.js +2 -7
- package/lib/constants/prop-types/aside.js +2 -8
- package/lib/constants/prop-types/body.js +4 -9
- package/lib/constants/prop-types/img-with-placeholder.js +2 -7
- package/lib/constants/prop-types/leading.js +8 -13
- package/lib/constants/prop-types/related.js +2 -7
- package/lib/constants/theme.js +2 -3
- package/lib/constants/typography.js +2 -5
- package/lib/contexts/dynamic-components-context.js +2 -8
- package/lib/managers/layout-manager.js +13 -28
- package/lib/managers/theme-manager.js +13 -32
- package/lib/managers/ui-manager.js +14 -26
- package/lib/utils/image.js +5 -14
- package/package.json +6 -6
|
@@ -1,54 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
4
|
-
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
10
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
15
|
-
|
|
16
11
|
var _body = _interopRequireDefault(require("../../constants/prop-types/body"));
|
|
17
|
-
|
|
18
12
|
var _css = _interopRequireDefault(require("../../constants/css"));
|
|
19
|
-
|
|
20
13
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
21
|
-
|
|
22
14
|
var _map = _interopRequireDefault(require("lodash/map"));
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
-
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
28
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
|
-
|
|
30
18
|
// lodash
|
|
19
|
+
|
|
31
20
|
var _ = {
|
|
32
21
|
get: _get["default"],
|
|
33
22
|
map: _map["default"]
|
|
34
23
|
};
|
|
35
24
|
var listStyle = /*#__PURE__*/(0, _styledComponents.css)(["", " ", " margin-block-start:0;margin-block-end:0;margin:0 0 0 3em;padding:0;"], _css["default"].linkChildren, _css["default"].paragraphText);
|
|
36
|
-
|
|
37
25
|
var Ul = /*#__PURE__*/_styledComponents["default"].ul.withConfig({
|
|
38
26
|
displayName: "list__Ul",
|
|
39
27
|
componentId: "sc-1as1ic3-0"
|
|
40
28
|
})(["", " list-style-type:disc;"], listStyle);
|
|
41
|
-
|
|
42
29
|
var Ol = /*#__PURE__*/_styledComponents["default"].ol.withConfig({
|
|
43
30
|
displayName: "list__Ol",
|
|
44
31
|
componentId: "sc-1as1ic3-1"
|
|
45
32
|
})(["", " list-style-type:decimal;"], listStyle);
|
|
46
|
-
|
|
47
33
|
var Li = /*#__PURE__*/_styledComponents["default"].li.withConfig({
|
|
48
34
|
displayName: "list__Li",
|
|
49
35
|
componentId: "sc-1as1ic3-2"
|
|
50
36
|
})(["margin:0 0 1em 0;padding:0;&:last-child{margin-bottom:0;}"]);
|
|
51
|
-
|
|
52
37
|
var buildLi = function buildLi(listItem, index) {
|
|
53
38
|
return /*#__PURE__*/_react["default"].createElement(Li, {
|
|
54
39
|
key: "list_".concat(index),
|
|
@@ -56,33 +41,27 @@ var buildLi = function buildLi(listItem, index) {
|
|
|
56
41
|
__html: listItem
|
|
57
42
|
}
|
|
58
43
|
});
|
|
59
|
-
};
|
|
60
|
-
|
|
44
|
+
};
|
|
61
45
|
|
|
46
|
+
// eslint-disable-next-line react/display-name
|
|
62
47
|
var buildList = function buildList(ordered) {
|
|
63
48
|
var L = ordered ? Ol : Ul;
|
|
64
|
-
|
|
65
49
|
var List = function List(props) {
|
|
66
50
|
var listItems = _.get(props, ['data', 'content']);
|
|
67
|
-
|
|
68
51
|
if (!Array.isArray(listItems) || listItems.length === 0) {
|
|
69
52
|
return null;
|
|
70
53
|
}
|
|
71
|
-
|
|
72
54
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
73
55
|
className: _.get(props, 'className', '')
|
|
74
56
|
}, /*#__PURE__*/_react["default"].createElement(L, null, _.map(listItems, buildLi)));
|
|
75
57
|
};
|
|
76
|
-
|
|
77
58
|
List.propTypes = {
|
|
78
59
|
className: _propTypes["default"].string,
|
|
79
60
|
data: _body["default"].elementData
|
|
80
61
|
};
|
|
81
62
|
return List;
|
|
82
63
|
};
|
|
83
|
-
|
|
84
|
-
var _default = {
|
|
64
|
+
var _default = exports["default"] = {
|
|
85
65
|
UnorderedList: buildList(false),
|
|
86
66
|
OrderedList: buildList(true)
|
|
87
|
-
};
|
|
88
|
-
exports["default"] = _default;
|
|
67
|
+
};
|
|
@@ -1,32 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
4
|
-
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _mediaQuery = _interopRequireDefault(require("@twreporter/core/lib/utils/media-query"));
|
|
11
|
-
|
|
12
9
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
13
|
-
|
|
14
10
|
var _theme = _interopRequireDefault(require("../../constants/theme"));
|
|
15
|
-
|
|
16
11
|
var _typography = _interopRequireDefault(require("../../constants/typography"));
|
|
17
|
-
|
|
18
12
|
var _color = require("@twreporter/core/lib/constants/color");
|
|
19
|
-
|
|
20
13
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
-
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
26
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
|
-
|
|
28
17
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
29
|
-
|
|
30
18
|
var mockup = {
|
|
31
19
|
mobile: {
|
|
32
20
|
figure: {
|
|
@@ -34,44 +22,43 @@ var mockup = {
|
|
|
34
22
|
},
|
|
35
23
|
caption: {
|
|
36
24
|
width: 250 // px
|
|
37
|
-
|
|
38
25
|
}
|
|
39
26
|
},
|
|
27
|
+
|
|
40
28
|
tablet: {
|
|
41
29
|
figure: {
|
|
42
30
|
width: '100%'
|
|
43
31
|
},
|
|
44
32
|
caption: {
|
|
45
33
|
width: 512 // px
|
|
46
|
-
|
|
47
34
|
}
|
|
48
35
|
},
|
|
36
|
+
|
|
49
37
|
desktop: {
|
|
50
38
|
figure: {
|
|
51
39
|
width: {
|
|
52
40
|
normal: 100,
|
|
53
41
|
// %
|
|
54
42
|
small: 403 // px
|
|
55
|
-
|
|
56
43
|
}
|
|
57
44
|
},
|
|
45
|
+
|
|
58
46
|
caption: {
|
|
59
47
|
width: 180 // px
|
|
60
|
-
|
|
61
48
|
}
|
|
62
49
|
},
|
|
50
|
+
|
|
63
51
|
hd: {
|
|
64
52
|
figure: {
|
|
65
53
|
width: {
|
|
66
54
|
normal: 100,
|
|
67
55
|
// %
|
|
68
56
|
small: 532 // px
|
|
69
|
-
|
|
70
57
|
}
|
|
71
58
|
},
|
|
59
|
+
|
|
72
60
|
caption: {
|
|
73
61
|
width: 265 // px
|
|
74
|
-
|
|
75
62
|
}
|
|
76
63
|
}
|
|
77
64
|
};
|
|
@@ -80,16 +67,13 @@ function getCaptionStyles(themeName) {
|
|
|
80
67
|
switch (themeName) {
|
|
81
68
|
case _theme["default"].article.v2.photo:
|
|
82
69
|
return (0, _styledComponents.css)(["color:", ";&::after{border-color:", ";}"], _color.colorGrayscale.gray300, _color.colorGrayscale.gray400);
|
|
83
|
-
|
|
84
70
|
case _theme["default"].article.v2.pink:
|
|
85
71
|
return (0, _styledComponents.css)(["color:", ";&::after{border-color:", ";}"], _color.colorGrayscale.gray700, _color.COLOR_PINK_ARTICLE.pink);
|
|
86
|
-
|
|
87
72
|
case _theme["default"].article.v2["default"]:
|
|
88
73
|
default:
|
|
89
74
|
return (0, _styledComponents.css)(["color:", ";&::after{border-color:", ";}"], _color.colorGrayscale.gray700, _color.colorSupportive.main);
|
|
90
75
|
}
|
|
91
76
|
}
|
|
92
|
-
|
|
93
77
|
var Caption = /*#__PURE__*/_styledComponents["default"].figcaption.withConfig({
|
|
94
78
|
displayName: "multimedia__Caption",
|
|
95
79
|
componentId: "e3dyai-0"
|
|
@@ -98,7 +82,6 @@ var Caption = /*#__PURE__*/_styledComponents["default"].figcaption.withConfig({
|
|
|
98
82
|
}, _typography["default"].font.weight.normal, function (props) {
|
|
99
83
|
return props.theme.fontSizeOffset + 14;
|
|
100
84
|
}, _mediaQuery["default"].tabletAndBelow(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n margin-left: auto;\n padding: 15px 15px 15px 0;\n &:after {\n width: calc(100% - 15px);\n }\n "]))), _mediaQuery["default"].mobileOnly(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n max-width: ", "px;\n "])), mockup.mobile.caption.width), _mediaQuery["default"].tabletOnly(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n max-width: ", "px;\n "])), mockup.tablet.caption.width), _mediaQuery["default"].desktopAndAbove(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n /* clear float */\n clear: both;\n\n position: relative;\n float: right;\n\n &:after {\n width: 100%;\n }\n "]))), _mediaQuery["default"].desktopOnly(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: ", "px;\n padding: 15px 0 15px 0;\n "])), mockup.desktop.caption.width), _mediaQuery["default"].hdOnly(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: ", "px;\n padding: 25px 0 20px 0;\n "])), mockup.hd.caption.width));
|
|
101
|
-
|
|
102
85
|
var Block = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
103
86
|
displayName: "multimedia__Block",
|
|
104
87
|
componentId: "e3dyai-1"
|
|
@@ -117,9 +100,7 @@ var Block = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
|
117
100
|
}), Caption, _mediaQuery["default"].desktopAndAbove(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", "\n "])), function (props) {
|
|
118
101
|
return props.$small ? "\n /* overwrite Caption styles */\n float: none;\n margin-bottom:0;\n position: absolute;\n\n /* give new styles */\n right: 0;\n bottom: 0;\n transform: translateY(100%);\n " : '';
|
|
119
102
|
}));
|
|
120
|
-
|
|
121
|
-
var _default = {
|
|
103
|
+
var _default = exports["default"] = {
|
|
122
104
|
Block: Block,
|
|
123
105
|
Caption: Caption
|
|
124
|
-
};
|
|
125
|
-
exports["default"] = _default;
|
|
106
|
+
};
|
|
@@ -1,39 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
4
|
-
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = Paragraph;
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _body = _interopRequireDefault(require("../../constants/prop-types/body"));
|
|
13
|
-
|
|
14
10
|
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
|
|
16
11
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
17
|
-
|
|
18
12
|
var _css = _interopRequireDefault(require("../../constants/css"));
|
|
19
|
-
|
|
20
13
|
var _theme = _interopRequireDefault(require("../../constants/theme"));
|
|
21
|
-
|
|
22
14
|
var _color = require("@twreporter/core/lib/constants/color");
|
|
23
|
-
|
|
24
15
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
-
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
30
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
|
-
|
|
32
19
|
// lodash
|
|
20
|
+
|
|
33
21
|
var _ = {
|
|
34
22
|
get: _get["default"]
|
|
35
23
|
};
|
|
36
|
-
|
|
37
24
|
var P = /*#__PURE__*/_styledComponents["default"].p.withConfig({
|
|
38
25
|
displayName: "paragraph__P",
|
|
39
26
|
componentId: "ebafhp-0"
|
|
@@ -41,18 +28,14 @@ var P = /*#__PURE__*/_styledComponents["default"].p.withConfig({
|
|
|
41
28
|
switch (props.theme.name) {
|
|
42
29
|
case _theme["default"].article.v2.photo:
|
|
43
30
|
return (0, _styledComponents.css)(["strong{color:", ";}"], _color.colorGrayscale.gray300);
|
|
44
|
-
|
|
45
31
|
default:
|
|
46
32
|
return '';
|
|
47
33
|
}
|
|
48
34
|
});
|
|
49
|
-
|
|
50
35
|
function Paragraph(_ref) {
|
|
51
36
|
var className = _ref.className,
|
|
52
|
-
|
|
53
|
-
|
|
37
|
+
data = _ref.data;
|
|
54
38
|
var innerHtmlString = _.get(data, ['content', 0]);
|
|
55
|
-
|
|
56
39
|
return innerHtmlString ? /*#__PURE__*/_react["default"].createElement(P, {
|
|
57
40
|
className: className,
|
|
58
41
|
dangerouslySetInnerHTML: {
|
|
@@ -60,7 +43,6 @@ function Paragraph(_ref) {
|
|
|
60
43
|
}
|
|
61
44
|
}) : null;
|
|
62
45
|
}
|
|
63
|
-
|
|
64
46
|
Paragraph.propTypes = {
|
|
65
47
|
className: _propTypes["default"].string,
|
|
66
48
|
data: _body["default"].elementData
|