@clicktap/ui 0.14.13 → 0.14.14
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/components/Link/Link.js +1 -1
- package/components/Link/Link.tsx +18 -13
- package/package.json +1 -1
package/components/Link/Link.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{forwardRef as d}from"react";import{Link as l}from"react-aria-components";import{cn as u}from"../../utils/cn.js";const x=d(({children:e,isDisabled:r,className:t,...o},a)=>n(l,{...o,isDisabled:r,className:s=>{const i=typeof t=="function"?t(s):t;return u("flex items-center cursor-pointer","text-slate-500","no-underline","transition-colors duration-300","hover:text-slate-800",['data-[disabled="true"]:cursor-default','data-[disabled="true"]:text-slate-300','data-[disabled="true"]:hover:text-slate-300'],i)},ref:a,children:e}));export{x as Link,x as default};
|
package/components/Link/Link.tsx
CHANGED
|
@@ -11,19 +11,24 @@ export const Link = forwardRef<HTMLAnchorElement, LinkProps>(
|
|
|
11
11
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
12
12
|
{...props}
|
|
13
13
|
isDisabled={isDisabled}
|
|
14
|
-
className={
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
className={(renderProps) => {
|
|
15
|
+
const userClasses =
|
|
16
|
+
typeof className === 'function' ? className(renderProps) : className;
|
|
17
|
+
|
|
18
|
+
return cn(
|
|
19
|
+
'flex items-center cursor-pointer',
|
|
20
|
+
'text-slate-500',
|
|
21
|
+
'no-underline',
|
|
22
|
+
'transition-colors duration-300',
|
|
23
|
+
'hover:text-slate-800',
|
|
24
|
+
[
|
|
25
|
+
'data-[disabled="true"]:cursor-default',
|
|
26
|
+
'data-[disabled="true"]:text-slate-300',
|
|
27
|
+
'data-[disabled="true"]:hover:text-slate-300',
|
|
28
|
+
],
|
|
29
|
+
userClasses
|
|
30
|
+
);
|
|
31
|
+
}}
|
|
27
32
|
ref={ref}
|
|
28
33
|
>
|
|
29
34
|
{children}
|