@ludo.ninja/components 2.3.86 → 2.3.87
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,6 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const ExperienceLabel: ({ value, link, loading, className, style }: {
|
|
2
3
|
value: number;
|
|
3
4
|
link?: string;
|
|
4
5
|
loading?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
5
8
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
9
|
export default ExperienceLabel;
|
|
@@ -85,12 +85,12 @@ const StyledExpTab = styled_components_1.default.div `
|
|
|
85
85
|
${ExperienceLabelStyles};
|
|
86
86
|
`;
|
|
87
87
|
//Component
|
|
88
|
-
const ExperienceLabel = ({ value = 0, link, loading }) => {
|
|
88
|
+
const ExperienceLabel = ({ value = 0, link, loading, className, style }) => {
|
|
89
89
|
if (loading)
|
|
90
90
|
return (0, jsx_runtime_1.jsx)(SkeletonLabel_1.default, {});
|
|
91
91
|
if (!value)
|
|
92
92
|
return null;
|
|
93
|
-
return link ? ((0, jsx_runtime_1.jsx)(StyledExpLink, { href: link, children: (0, jsx_runtime_1.jsx)(LabelContent, { value: value }) })) : ((0, jsx_runtime_1.jsx)(StyledExpTab, { children: (0, jsx_runtime_1.jsx)(LabelContent, { value: value }) }));
|
|
93
|
+
return link ? ((0, jsx_runtime_1.jsx)(StyledExpLink, { href: link, className: className, style: style, children: (0, jsx_runtime_1.jsx)(LabelContent, { value: value }) })) : ((0, jsx_runtime_1.jsx)(StyledExpTab, { className: className, style: style, children: (0, jsx_runtime_1.jsx)(LabelContent, { value: value }) }));
|
|
94
94
|
};
|
|
95
95
|
const LabelContent = ({ value }) => {
|
|
96
96
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(image_1.default, { src: `${constants_1.staticLink}/public/rewardsPage/XP_logo.svg`, alt: "Experience logo", width: 20, height: 20 }), (0, jsx_runtime_1.jsxs)("p", { className: `value`, children: [value, " XP"] })] }));
|