@idbrnd/design-system 1.12.1 → 1.12.2
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/README.md +1 -1
- package/dist/components/Feedback/PushBadge/PushBadge.d.ts +2 -1
- package/dist/index.js +14 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @idbrnd/design-system
|
|
2
2
|
|
|
3
|
-

|
|
4
4
|

|
|
5
5
|

|
|
6
6
|

|
|
@@ -3,11 +3,12 @@ export type PushBadgeVariant = 'dot' | 'number' | 'info';
|
|
|
3
3
|
export interface PushBadgeProps {
|
|
4
4
|
variant?: PushBadgeVariant;
|
|
5
5
|
count?: number;
|
|
6
|
+
maxCount?: number;
|
|
6
7
|
bgColor?: string;
|
|
7
8
|
color?: string;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
customStyle?: CSSProperties;
|
|
10
11
|
className?: string;
|
|
11
12
|
}
|
|
12
|
-
declare function PushBadge({ variant, count, bgColor, color, disabled, customStyle, className }: PushBadgeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
declare function PushBadge({ variant, count, maxCount, bgColor, color, disabled, customStyle, className }: PushBadgeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
13
14
|
export default PushBadge;
|
package/dist/index.js
CHANGED
|
@@ -969,21 +969,22 @@ const Hr = "_badge_iiym7_1", Wr = "_dot_iiym7_16", qr = "_number_iiym7_23", Vr =
|
|
|
969
969
|
function c0({
|
|
970
970
|
variant: e = "number",
|
|
971
971
|
count: t = 1,
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
972
|
+
maxCount: n = 999,
|
|
973
|
+
bgColor: o,
|
|
974
|
+
color: s,
|
|
975
|
+
disabled: l = !1,
|
|
976
|
+
customStyle: r = {},
|
|
977
|
+
className: c
|
|
977
978
|
}) {
|
|
978
|
-
if (
|
|
979
|
+
if (l)
|
|
979
980
|
return null;
|
|
980
|
-
const
|
|
981
|
-
...
|
|
982
|
-
...
|
|
983
|
-
...
|
|
984
|
-
},
|
|
985
|
-
return /* @__PURE__ */ T("span", { "data-idb-component": !0, className:
|
|
986
|
-
e === "number" ?
|
|
981
|
+
const i = t > n ? `${n}+` : t, d = {
|
|
982
|
+
...o ? { backgroundColor: o } : {},
|
|
983
|
+
...s ? { color: s } : {},
|
|
984
|
+
...r
|
|
985
|
+
}, p = [on.badge, on[e], c ?? ""].filter(Boolean).join(" ");
|
|
986
|
+
return /* @__PURE__ */ T("span", { "data-idb-component": !0, className: p, style: d, children: [
|
|
987
|
+
e === "number" ? i : null,
|
|
987
988
|
e === "info" ? "?" : null
|
|
988
989
|
] });
|
|
989
990
|
}
|