@mintlify/components 0.4.4 → 0.4.5
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/dist/components/badge/badge.js +15 -13
- package/dist/index.d.ts +6 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cn as
|
|
1
|
+
import { jsxs as p, jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { cn as f } from "../../utils/cn.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import { Icon as
|
|
5
|
-
function
|
|
4
|
+
import { Icon as l } from "../icon/icon.js";
|
|
5
|
+
function y({
|
|
6
6
|
children: d,
|
|
7
7
|
color: e = "gray",
|
|
8
8
|
shape: m = "rounded",
|
|
@@ -11,18 +11,20 @@ function j({
|
|
|
11
11
|
disabled: s = !1,
|
|
12
12
|
icon: t,
|
|
13
13
|
iconType: n,
|
|
14
|
-
|
|
14
|
+
iconLibrary: i,
|
|
15
|
+
className: c
|
|
15
16
|
}) {
|
|
16
|
-
const o = typeof t == "string" ? /* @__PURE__ */
|
|
17
|
-
|
|
17
|
+
const o = typeof t == "string" ? /* @__PURE__ */ g(
|
|
18
|
+
l,
|
|
18
19
|
{
|
|
19
20
|
icon: t,
|
|
20
21
|
iconType: n,
|
|
22
|
+
iconLibrary: i,
|
|
21
23
|
className: "mt-badge-icon",
|
|
22
|
-
size:
|
|
24
|
+
size: b[a]
|
|
23
25
|
}
|
|
24
26
|
) : t;
|
|
25
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ p(
|
|
26
28
|
"span",
|
|
27
29
|
{
|
|
28
30
|
"data-shape": m,
|
|
@@ -31,11 +33,11 @@ function j({
|
|
|
31
33
|
"data-color": e,
|
|
32
34
|
"data-size": a,
|
|
33
35
|
"aria-disabled": s,
|
|
34
|
-
className:
|
|
36
|
+
className: f(
|
|
35
37
|
"mt-badge",
|
|
36
38
|
`mt-badge-${e}`,
|
|
37
39
|
`mt-badge-${a}`,
|
|
38
|
-
|
|
40
|
+
c
|
|
39
41
|
),
|
|
40
42
|
children: [
|
|
41
43
|
!!o && o,
|
|
@@ -44,12 +46,12 @@ function j({
|
|
|
44
46
|
}
|
|
45
47
|
);
|
|
46
48
|
}
|
|
47
|
-
const
|
|
49
|
+
const b = {
|
|
48
50
|
xs: 12,
|
|
49
51
|
sm: 14,
|
|
50
52
|
md: 16,
|
|
51
53
|
lg: 16
|
|
52
54
|
};
|
|
53
55
|
export {
|
|
54
|
-
|
|
56
|
+
y as Badge
|
|
55
57
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { CSSProperties } from 'react';
|
|
|
2
2
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
|
|
5
|
-
export declare function Badge({ children, color, shape, size, stroke, disabled, icon, iconType, className, }: BadgeProps): JSX_2.Element;
|
|
5
|
+
export declare function Badge({ children, color, shape, size, stroke, disabled, icon, iconType, iconLibrary, className, }: BadgeProps): JSX_2.Element;
|
|
6
6
|
|
|
7
7
|
export declare interface BadgeProps {
|
|
8
8
|
/**
|
|
@@ -42,6 +42,11 @@ export declare interface BadgeProps {
|
|
|
42
42
|
* @see {@link IconType}
|
|
43
43
|
*/
|
|
44
44
|
iconType?: IconType;
|
|
45
|
+
/**
|
|
46
|
+
* Icon library when `icon` is a string.
|
|
47
|
+
* @see {@link IconLibrary}
|
|
48
|
+
*/
|
|
49
|
+
iconLibrary?: IconLibrary;
|
|
45
50
|
className?: string;
|
|
46
51
|
children: ReactNode;
|
|
47
52
|
}
|