@ztwoint/z-ui 0.1.120 → 0.1.121
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.
|
@@ -4,5 +4,6 @@ export interface NavItemProps extends React.ButtonHTMLAttributes<HTMLButtonEleme
|
|
|
4
4
|
leftIcon?: React.ReactNode;
|
|
5
5
|
rightIcon?: React.ReactNode;
|
|
6
6
|
label?: string;
|
|
7
|
+
asTag?: React.ElementType;
|
|
7
8
|
}
|
|
8
9
|
export declare const NavItem: React.ForwardRefExoticComponent<NavItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as u, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import p from "react";
|
|
3
3
|
import { cn as f } from "../../../lib/utils.js";
|
|
4
|
-
const
|
|
5
|
-
({ leftIcon: n, label:
|
|
6
|
-
const
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
|
|
4
|
+
const v = p.forwardRef(
|
|
5
|
+
({ leftIcon: n, label: t, rightIcon: o, className: i, isActive: a, children: c, asTag: l = "button", ...d }, m) => {
|
|
6
|
+
const r = t ?? c, s = "w-3.5 h-3.5 min-w-max";
|
|
7
|
+
return /* @__PURE__ */ u(
|
|
8
|
+
l,
|
|
9
9
|
{
|
|
10
|
-
ref:
|
|
10
|
+
ref: m,
|
|
11
11
|
className: f(
|
|
12
12
|
"h-7.5 inline-flex items-center justify-center p-2 gap-1 rounded-lg",
|
|
13
13
|
"hover:bg-background-inverted-elevated text-inverted-primary",
|
|
14
14
|
"leading-none-medium-sm",
|
|
15
15
|
"select-none hover:cursor-pointer disabled:cursor-not-allowed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring-default",
|
|
16
16
|
a && "bg-background-inverted-elevated",
|
|
17
|
-
|
|
17
|
+
i
|
|
18
18
|
),
|
|
19
|
-
...
|
|
19
|
+
...d,
|
|
20
20
|
children: [
|
|
21
21
|
n && /* @__PURE__ */ e("span", { className: s, children: n }),
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
r && /* @__PURE__ */ e("span", { children: r }),
|
|
23
|
+
o && /* @__PURE__ */ e("span", { className: s, children: o })
|
|
24
24
|
]
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
|
-
|
|
29
|
+
v.displayName = "NavItem";
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
v as NavItem
|
|
32
32
|
};
|
|
@@ -4,5 +4,6 @@ export interface NavItemProps extends React.ButtonHTMLAttributes<HTMLButtonEleme
|
|
|
4
4
|
leftIcon?: React.ReactNode;
|
|
5
5
|
rightIcon?: React.ReactNode;
|
|
6
6
|
label?: string;
|
|
7
|
+
asTag?: React.ElementType;
|
|
7
8
|
}
|
|
8
9
|
export declare const NavItem: React.ForwardRefExoticComponent<NavItemProps & React.RefAttributes<HTMLButtonElement>>;
|