@meduza/ui-kit-2 0.1.54 → 0.1.55
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/ui-kit-2.cjs.development.js +5 -7
- package/dist/ui-kit-2.cjs.development.js.map +1 -1
- package/dist/ui-kit-2.cjs.production.min.js +1 -1
- package/dist/ui-kit-2.cjs.production.min.js.map +1 -1
- package/dist/ui-kit-2.esm.js +5 -7
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/dist/ui-kit.css +1234 -1234
- package/package.json +6 -2
- package/src/RelatedBlock/index.tsx +4 -6
- package/src/RelatedRichBlock/index.tsx +5 -4
- package/src/_storybook/PreviewWrapper/PreviewWrapper.module.css +2 -1
package/dist/ui-kit-2.esm.js
CHANGED
|
@@ -3,6 +3,7 @@ import { useInView } from 'react-intersection-observer';
|
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
4
|
import 'dayjs/locale/ru';
|
|
5
5
|
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
6
|
+
import { Link } from 'react-router-dom';
|
|
6
7
|
|
|
7
8
|
var makeClassName = function makeClassName(list) {
|
|
8
9
|
return list.filter(function (_ref) {
|
|
@@ -1604,10 +1605,8 @@ var RelatedBlock = function RelatedBlock(_ref) {
|
|
|
1604
1605
|
return React.createElement("li", {
|
|
1605
1606
|
key: item.id || index,
|
|
1606
1607
|
className: styles$p[item.layout]
|
|
1607
|
-
}, React.createElement(
|
|
1608
|
-
|
|
1609
|
-
target: "_blank",
|
|
1610
|
-
rel: "noopener noreferrer"
|
|
1608
|
+
}, React.createElement(Link, {
|
|
1609
|
+
to: item.full_url || "/" + item.url
|
|
1611
1610
|
}, React.createElement("span", {
|
|
1612
1611
|
className: styles$p.first
|
|
1613
1612
|
}, item.title), item.second_title && ' ', item.second_title && React.createElement("span", null, item.second_title)));
|
|
@@ -2415,11 +2414,10 @@ var RelatedRichBlock = function RelatedRichBlock(_ref) {
|
|
|
2415
2414
|
}
|
|
2416
2415
|
}
|
|
2417
2416
|
|
|
2418
|
-
return React.createElement(
|
|
2417
|
+
return React.createElement(Link, {
|
|
2419
2418
|
"data-testid": "related-rich-block",
|
|
2420
2419
|
className: makeClassName(classNames),
|
|
2421
|
-
|
|
2422
|
-
target: "_blank",
|
|
2420
|
+
to: "/" + url,
|
|
2423
2421
|
onClick: function onClick() {
|
|
2424
2422
|
return handleClick();
|
|
2425
2423
|
},
|