@pronto-tools-and-more/components 12.17.0 → 12.18.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/main.js CHANGED
@@ -392,21 +392,27 @@ var BaseSideBar = ({ children }) => {
392
392
  return /* @__PURE__ */ React.createElement("aside", { className: "SideBar" }, ...children);
393
393
  };
394
394
 
395
+ // src/parts/FixTo/FixTo.ts
396
+ var fixTo = (to) => {
397
+ if (to && to.startsWith("/#/")) {
398
+ return to.slice(2);
399
+ }
400
+ return to;
401
+ };
402
+
395
403
  // src/parts/Button/Button.tsx
396
404
  var Button = ({
397
405
  message,
398
406
  to,
399
407
  className
400
408
  }) => {
401
- if (to && to.startsWith("/#/")) {
402
- to = to.slice(2);
403
- }
409
+ const fixedTo = fixTo(to);
404
410
  const json = {
405
411
  type: "button",
406
412
  message,
407
413
  tap: {
408
414
  type: "navigate",
409
- path: to
415
+ path: fixedTo
410
416
  }
411
417
  };
412
418
  const fullClassName = `Button ${className || ""}`;
@@ -1109,11 +1115,12 @@ var Link = ({
1109
1115
  } else {
1110
1116
  fullMessage = `<span class="LinkContent">${message}</span>`;
1111
1117
  }
1118
+ const fixedTo = fixTo(to);
1112
1119
  const json = {
1113
1120
  type: "button",
1114
1121
  tap: {
1115
1122
  type: "navigate",
1116
- path: to
1123
+ path: fixedTo
1117
1124
  },
1118
1125
  message: fullMessage
1119
1126
  };
@@ -0,0 +1 @@
1
+ export declare const fixTo: (to: any) => any;
@@ -1,4 +1,4 @@
1
- export type LinkIconPosition = 'left' | 'right';
1
+ export type LinkIconPosition = "left" | "right";
2
2
  export declare const Link: ({ to, message, className, icon, iconPosition, }: {
3
3
  to: string;
4
4
  message: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/components",
3
- "version": "12.17.0",
3
+ "version": "12.18.0",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",