@youngonesworks/ui 1.0.7 → 1.0.8
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface IBadgeProps {
|
|
2
|
-
styleVariant?: 'green-light' | 'red' | 'accent-blue' | 'warning' | 'gray' | 'black' | 'dark-gray' | 'purple' | 'secondary' | 'secondary-light' | 'gray' | 'white';
|
|
2
|
+
styleVariant?: 'primary' | 'green-light' | 'red' | 'accent-blue' | 'warning' | 'gray' | 'black' | 'dark-gray' | 'purple' | 'secondary' | 'secondary-light' | 'gray' | 'white';
|
|
3
3
|
color?: 'dark' | 'gray' | 'red' | 'secondary' | 'grape' | 'violet' | 'indigo' | 'blue' | 'cyan' | 'green' | 'lime' | 'yellow' | 'orange' | 'teal';
|
|
4
4
|
favorite?: boolean;
|
|
5
5
|
children?: React.ReactNode;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Ref, RefCallback } from 'react';
|
|
1
|
+
import { type Ref, type RefCallback } from 'react';
|
|
2
2
|
export declare function useMergeRefs<T>(...refs: (Ref<T> | undefined)[]): RefCallback<T>;
|
package/dist/index.cjs
CHANGED
|
@@ -752,19 +752,20 @@ const Badge = ({ styleVariant = COLOR.ACCENT_BLUE, className, favorite, children
|
|
|
752
752
|
"bg-accent-blue-light text-accent-blue": styleVariant === COLOR.ACCENT_BLUE,
|
|
753
753
|
"bg-green-light text-green": styleVariant === COLOR.GREEN_LIGHT,
|
|
754
754
|
"bg-red-50 text-red-500": styleVariant === COLOR.RED,
|
|
755
|
-
"bg-purple-light text-purple": styleVariant === COLOR.PURPLE,
|
|
755
|
+
"bg-purple-light text-black border border-purple": styleVariant === COLOR.PURPLE,
|
|
756
756
|
"bg-warning-light text-warning": styleVariant === COLOR.WARNING,
|
|
757
757
|
"bg-gray-50 text-black": styleVariant === COLOR.DARK_GRAY,
|
|
758
758
|
"bg-black text-white": styleVariant === COLOR.BLACK,
|
|
759
759
|
"bg-gray-50 text-gray-800": styleVariant === COLOR.GRAY,
|
|
760
760
|
"bg-secondary-light text-secondary": styleVariant === COLOR.SECONDARY_LIGHT,
|
|
761
761
|
"bg-secondary text-white": styleVariant === COLOR.SECONDARY,
|
|
762
|
-
"bg-white text-black": styleVariant === COLOR.WHITE
|
|
762
|
+
"bg-white text-black": styleVariant === COLOR.WHITE,
|
|
763
|
+
"bg-turquoise-50 text-black border border-primary": styleVariant === COLOR.PRIMARY
|
|
763
764
|
}, className),
|
|
764
765
|
...props,
|
|
765
766
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
766
767
|
"data-testid": "badge-content",
|
|
767
|
-
className: cn("block h-
|
|
768
|
+
className: cn("block h-[22px] overflow-hidden text-ellipsis whitespace-nowrap text-inherit", { "flex items-center": favorite }),
|
|
768
769
|
children
|
|
769
770
|
})
|
|
770
771
|
});
|