@pronto-tools-and-more/components 9.4.0 → 9.5.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/main.js CHANGED
@@ -360,9 +360,19 @@ var Link = ({
360
360
  to,
361
361
  message,
362
362
  className,
363
- icon
363
+ icon,
364
+ iconPosition
364
365
  }) => {
365
- const fullMessage = icon ? `<span class="LinkContent"><span>${message}</span><div class="MaskIcon MaskIcon${icon}"></div>` : `<span class="LinkContent">${message}</span>`;
366
+ let fullMessage;
367
+ if (icon) {
368
+ if (iconPosition === "left") {
369
+ fullMessage = `<span class="LinkContent"><div class="MaskIcon MaskIcon${icon}"></div><span>${message}</span></span>`;
370
+ } else {
371
+ fullMessage = `<span class="LinkContent"><span>${message}</span><div class="MaskIcon MaskIcon${icon}"></div></span>`;
372
+ }
373
+ } else {
374
+ fullMessage = `<span class="LinkContent">${message}</span>`;
375
+ }
366
376
  const json = {
367
377
  type: "button",
368
378
  tap: {
@@ -1,6 +1,8 @@
1
- export declare const Link: ({ to, message, className, icon, }: {
1
+ export type LinkIconPosition = 'left' | 'right';
2
+ export declare const Link: ({ to, message, className, icon, iconPosition, }: {
2
3
  to: string;
3
4
  message: string;
4
5
  className?: string;
5
6
  icon?: string;
7
+ iconPosition?: LinkIconPosition;
6
8
  }) => import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/components",
3
- "version": "9.4.0",
3
+ "version": "9.5.0",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",