@pronto-tools-and-more/components 15.23.0 → 15.24.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/main.js +17 -6
- package/dist/parts/Button/Button.d.ts +2 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
@@ -549,19 +549,30 @@ var fixTo = (to) => {
|
|
549
549
|
};
|
550
550
|
|
551
551
|
// src/parts/Button/Button.tsx
|
552
|
+
var getTap = (hasAbsolutePath, to) => {
|
553
|
+
const fixedTo = fixTo(to);
|
554
|
+
if (hasAbsolutePath) {
|
555
|
+
return {
|
556
|
+
type: "openUrl",
|
557
|
+
url: fixedTo
|
558
|
+
};
|
559
|
+
}
|
560
|
+
return {
|
561
|
+
type: "navigate",
|
562
|
+
path: fixedTo
|
563
|
+
};
|
564
|
+
};
|
552
565
|
var Button = ({
|
553
566
|
message,
|
554
567
|
to,
|
555
|
-
className
|
568
|
+
className,
|
569
|
+
hasAbsolutePath
|
556
570
|
}) => {
|
557
|
-
const
|
571
|
+
const tap = getTap(hasAbsolutePath, to);
|
558
572
|
const json = {
|
559
573
|
type: "button",
|
560
574
|
message,
|
561
|
-
tap
|
562
|
-
type: "navigate",
|
563
|
-
path: fixedTo
|
564
|
-
}
|
575
|
+
tap
|
565
576
|
};
|
566
577
|
const fullClassName = `Button ${className || ""}`;
|
567
578
|
return /* @__PURE__ */ React.createElement("div", { className: fullClassName }, /* @__PURE__ */ React.createElement(JsonComponent, { json }));
|