@pronto-tools-and-more/components 11.5.0 → 11.7.0
Sign up to get free protection for your applications and to get access to all the features.
package/dist/main.js
CHANGED
@@ -292,6 +292,27 @@ var ArticleList = ({
|
|
292
292
|
return /* @__PURE__ */ React.createElement("div", { className: "ArticleList IssueList" }, /* @__PURE__ */ React.createElement(JsonComponent, { json }));
|
293
293
|
};
|
294
294
|
|
295
|
+
// src/parts/BaseBookmarkButton/BaseBookmarkButton.tsx
|
296
|
+
var BaseBookmarkButton = ({
|
297
|
+
info,
|
298
|
+
children,
|
299
|
+
className
|
300
|
+
}) => {
|
301
|
+
const stringifiedInfo = JSON.stringify(info);
|
302
|
+
const fnString = `globalThis.toggleBookmarkArticle(${stringifiedInfo})`;
|
303
|
+
const dataBookmarked = `$functions.isBookmarked(${info.id})`;
|
304
|
+
return /* @__PURE__ */ React.createElement(
|
305
|
+
"button",
|
306
|
+
{
|
307
|
+
className,
|
308
|
+
onClick: fnString,
|
309
|
+
"data-article-id": info.id,
|
310
|
+
"data-bookmarked": dataBookmarked
|
311
|
+
},
|
312
|
+
...children
|
313
|
+
);
|
314
|
+
};
|
315
|
+
|
295
316
|
// src/parts/Button/Button.tsx
|
296
317
|
var Button = ({
|
297
318
|
message,
|
@@ -1557,6 +1578,7 @@ var TagList = ({ render }) => {
|
|
1557
1578
|
export {
|
1558
1579
|
ArticleAuthors,
|
1559
1580
|
ArticleList,
|
1581
|
+
BaseBookmarkButton,
|
1560
1582
|
Button,
|
1561
1583
|
CategoryList,
|
1562
1584
|
Collection,
|
@@ -1,6 +1,7 @@
|
|
1
1
|
export * from "../ArticleAuthors/ArticleAuthors.tsx";
|
2
2
|
export * from "../ArticleList/ArticleList.tsx";
|
3
3
|
export * from "../ArticleListItemRenderer/ArticleListItemRenderer.ts";
|
4
|
+
export * from "../BaseBookmarkButton/BaseBookmarkButton.tsx";
|
4
5
|
export * from "../Button/Button.tsx";
|
5
6
|
export * from "../CategoryList/CategoryList.tsx";
|
6
7
|
export * from "../Collection/Collection.tsx";
|