@npm_leadtech/legal-contracts-ui 0.44.18 → 0.44.19
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.
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import { ElementType } from 'react';
|
|
3
2
|
import { FC } from 'react';
|
|
4
3
|
import { ReactNode } from 'react';
|
|
5
4
|
|
|
@@ -23,8 +22,7 @@ export type IconPosition = 'left' | 'right' | 'top';
|
|
|
23
22
|
|
|
24
23
|
export interface LinkProps extends ComponentPropsWithoutRef<'a'> {
|
|
25
24
|
children: ReactNode;
|
|
26
|
-
|
|
27
|
-
asCustom?: ElementType;
|
|
25
|
+
asChild?: boolean;
|
|
28
26
|
size?: ButtonSize;
|
|
29
27
|
variant?: ButtonVariant;
|
|
30
28
|
iconPosition?: IconPosition;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import { ComponentPropsWithRef } from 'react';
|
|
3
|
-
import { ElementType } from 'react';
|
|
4
3
|
import { FC } from 'react';
|
|
5
4
|
import { ReactNode } from 'react';
|
|
6
5
|
|
|
@@ -108,8 +107,7 @@ export interface LawGeniusSectionProps {
|
|
|
108
107
|
|
|
109
108
|
export interface LinkProps extends ComponentPropsWithoutRef<'a'> {
|
|
110
109
|
children: ReactNode;
|
|
111
|
-
|
|
112
|
-
asCustom?: ElementType;
|
|
110
|
+
asChild?: boolean;
|
|
113
111
|
size?: ButtonSize;
|
|
114
112
|
variant?: ButtonVariant;
|
|
115
113
|
iconPosition?: IconPosition;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import { ElementType } from 'react';
|
|
3
2
|
import { JSX } from 'react/jsx-runtime';
|
|
4
3
|
import { ReactNode } from 'react';
|
|
5
4
|
|
|
@@ -9,12 +8,11 @@ export type ButtonVariant = 'primary-green' | 'primary-darkgreen' | 'primary-yel
|
|
|
9
8
|
|
|
10
9
|
export type IconPosition = 'left' | 'right' | 'top';
|
|
11
10
|
|
|
12
|
-
export declare const Link: ({ children,
|
|
11
|
+
export declare const Link: ({ children, asChild, size, variant, iconPosition, className, ...props }: LinkProps) => JSX.Element;
|
|
13
12
|
|
|
14
13
|
export declare interface LinkProps extends ComponentPropsWithoutRef<'a'> {
|
|
15
14
|
children: ReactNode;
|
|
16
|
-
|
|
17
|
-
asCustom?: ElementType;
|
|
15
|
+
asChild?: boolean;
|
|
18
16
|
size?: ButtonSize;
|
|
19
17
|
variant?: ButtonVariant;
|
|
20
18
|
iconPosition?: IconPosition;
|
package/dist/components/Link.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "react";
|
|
3
|
-
import { getButtonStyles as
|
|
4
|
-
const
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { isValidElement as n, cloneElement as i } from "react";
|
|
3
|
+
import { getButtonStyles as p } from "./atoms/Button.utils.js";
|
|
4
|
+
const g = ({
|
|
5
5
|
children: t,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
size: n = "default",
|
|
6
|
+
asChild: m = !1,
|
|
7
|
+
size: a = "default",
|
|
9
8
|
variant: r = "primary-green",
|
|
10
|
-
iconPosition:
|
|
11
|
-
className:
|
|
12
|
-
...
|
|
9
|
+
iconPosition: o = "left",
|
|
10
|
+
className: l,
|
|
11
|
+
...e
|
|
13
12
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
return
|
|
13
|
+
const s = p({ variant: r, size: a, iconPosition: o, className: l });
|
|
14
|
+
return m && n(t) ? i(t, {
|
|
15
|
+
...e,
|
|
16
|
+
className: `${s} ${t.props.className ?? ""}`.trim()
|
|
17
|
+
}) : /* @__PURE__ */ f("a", { className: s, ...e, children: t });
|
|
16
18
|
};
|
|
17
19
|
export {
|
|
18
|
-
|
|
20
|
+
g as Link
|
|
19
21
|
};
|