azeriand-library 1.12.0 → 1.13.0
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.d.ts +2 -1
- package/dist/index.esm.js +11 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +11 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CardProps } from '../card/card';
|
|
2
2
|
type BadgeProps = CardProps & {
|
|
3
3
|
label: string;
|
|
4
|
+
size?: 'sm' | 'lg';
|
|
4
5
|
};
|
|
5
|
-
export declare function Badge({ label, ...cardProps }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function Badge({ label, size, ...cardProps }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
package/dist/index.esm.js
CHANGED
|
@@ -15797,8 +15797,17 @@ function Button({ children, label, icon, position: position2 = "left", onClick,
|
|
|
15797
15797
|
position2 === "right" && icon
|
|
15798
15798
|
] }) });
|
|
15799
15799
|
}
|
|
15800
|
-
function Badge({ label, ...cardProps }) {
|
|
15801
|
-
|
|
15800
|
+
function Badge({ label, size, ...cardProps }) {
|
|
15801
|
+
let cardClassNames = "rounded-md";
|
|
15802
|
+
let divClassNames = "px-1.5 py-0.5 text-[0.85rem]";
|
|
15803
|
+
if (size === "sm") {
|
|
15804
|
+
cardClassNames = "rounded-md";
|
|
15805
|
+
divClassNames = "px-1 py-0.5 text-[0.65rem]";
|
|
15806
|
+
} else if (size === "lg") {
|
|
15807
|
+
cardClassNames = "rounded-lg";
|
|
15808
|
+
divClassNames = "px-2 py-0.5 text-[1rem]";
|
|
15809
|
+
}
|
|
15810
|
+
return /* @__PURE__ */ jsx$1(Card, { noBlur: true, noPadding: true, className: `w-fit ${cardClassNames}`, ...cardProps, children: /* @__PURE__ */ jsx$1("div", { className: `font-bold ${divClassNames}`, children: label }) });
|
|
15802
15811
|
}
|
|
15803
15812
|
var DefaultContext = {
|
|
15804
15813
|
color: void 0,
|