@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 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 fixedTo = fixTo(to);
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 }));
@@ -1,5 +1,6 @@
1
- export declare const Button: ({ message, to, className, }: {
1
+ export declare const Button: ({ message, to, className, hasAbsolutePath, }: {
2
2
  message: string;
3
3
  to: string;
4
4
  className?: string;
5
+ hasAbsolutePath?: boolean;
5
6
  }) => import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/components",
3
- "version": "15.23.0",
3
+ "version": "15.24.0",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",