sprint-asia-custom-component 0.1.86 → 0.1.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.
- package/dist/index.js +7 -7
- package/package.json +1 -1
- package/src/components/description/index.js +14 -24
- package/src/templates/index.js +5 -1
package/dist/index.js
CHANGED
|
@@ -23853,8 +23853,8 @@
|
|
|
23853
23853
|
};
|
|
23854
23854
|
|
|
23855
23855
|
const Description = ({
|
|
23856
|
-
title
|
|
23857
|
-
value
|
|
23856
|
+
title,
|
|
23857
|
+
value,
|
|
23858
23858
|
textColor = "default",
|
|
23859
23859
|
subtitle,
|
|
23860
23860
|
linkSubtitle,
|
|
@@ -23865,12 +23865,12 @@
|
|
|
23865
23865
|
className: "w-full"
|
|
23866
23866
|
}, title && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
23867
23867
|
className: "text-sm font-normal text-black mb-1"
|
|
23868
|
-
}, title), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
23868
|
+
}, title), value && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
23869
23869
|
className: "py-1"
|
|
23870
23870
|
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
23871
23871
|
className: `
|
|
23872
|
-
|
|
23873
|
-
|
|
23872
|
+
${textColor == "default" && "text-black font-semibold text-base"}
|
|
23873
|
+
${textColor == "success" && "text-success500 font-semibold text-base"}
|
|
23874
23874
|
`
|
|
23875
23875
|
}, value)), subtitle && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
23876
23876
|
className: "flex items-center mt-1"
|
|
@@ -23882,11 +23882,11 @@
|
|
|
23882
23882
|
}, linkSubtitle)), image && (typeof image === "string" ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
23883
23883
|
src: image,
|
|
23884
23884
|
alt: "voucher-img",
|
|
23885
|
-
className: "w-52 h-52 object-
|
|
23885
|
+
className: "w-52 h-52 object-cover rounded-lg mt-1"
|
|
23886
23886
|
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
23887
23887
|
src: URL.createObjectURL(image),
|
|
23888
23888
|
alt: "voucher-img",
|
|
23889
|
-
className: "w-52 h-52 object-
|
|
23889
|
+
className: "w-52 h-52 object-cover rounded-lg mt-1"
|
|
23890
23890
|
})));
|
|
23891
23891
|
};
|
|
23892
23892
|
|
package/package.json
CHANGED
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
const Description = ({
|
|
4
|
-
title = "Title",
|
|
5
|
-
value = "Description",
|
|
6
|
-
textColor = "default",
|
|
7
|
-
subtitle,
|
|
8
|
-
linkSubtitle,
|
|
9
|
-
onClickSubtitle,
|
|
10
|
-
image,
|
|
11
|
-
}) => {
|
|
3
|
+
const Description = ({ title, value, textColor = "default", subtitle, linkSubtitle, onClickSubtitle, image }) => {
|
|
12
4
|
return (
|
|
13
5
|
<div className="w-full">
|
|
14
6
|
{title && <p className="text-sm font-normal text-black mb-1">{title}</p>}
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
{value && (
|
|
8
|
+
<div className="py-1">
|
|
9
|
+
<p
|
|
10
|
+
className={`
|
|
11
|
+
${textColor == "default" && "text-black font-semibold text-base"}
|
|
12
|
+
${textColor == "success" && "text-success500 font-semibold text-base"}
|
|
20
13
|
`}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
>
|
|
15
|
+
{value}
|
|
16
|
+
</p>
|
|
17
|
+
</div>
|
|
18
|
+
)}
|
|
25
19
|
{subtitle && (
|
|
26
20
|
<div className="flex items-center mt-1">
|
|
27
21
|
<p className="text-sm font-normal text-black mr-1">{subtitle}</p>
|
|
@@ -35,13 +29,9 @@ const Description = ({
|
|
|
35
29
|
|
|
36
30
|
{image &&
|
|
37
31
|
(typeof image === "string" ? (
|
|
38
|
-
<img src={image} alt="voucher-img" className="w-52 h-52 object-
|
|
32
|
+
<img src={image} alt="voucher-img" className="w-52 h-52 object-cover rounded-lg mt-1" />
|
|
39
33
|
) : (
|
|
40
|
-
<img
|
|
41
|
-
src={URL.createObjectURL(image)}
|
|
42
|
-
alt="voucher-img"
|
|
43
|
-
className="w-52 h-52 object-contain rounded-lg mt-1"
|
|
44
|
-
/>
|
|
34
|
+
<img src={URL.createObjectURL(image)} alt="voucher-img" className="w-52 h-52 object-cover rounded-lg mt-1" />
|
|
45
35
|
))}
|
|
46
36
|
</div>
|
|
47
37
|
);
|
package/src/templates/index.js
CHANGED
|
@@ -1059,7 +1059,11 @@ const Templates = () => {
|
|
|
1059
1059
|
|
|
1060
1060
|
<div className="m-9"></div>
|
|
1061
1061
|
<p className="text-black font-bold text-2xl text-center py-2">Description</p>
|
|
1062
|
-
<Description
|
|
1062
|
+
<Description
|
|
1063
|
+
title="Sample Title"
|
|
1064
|
+
// value="This is a sample description."
|
|
1065
|
+
image="https://static.promediateknologi.id/crop/0x0:0x0/0x0/webp/photo/jawapos/2022/09/one-piece-red.jpeg"
|
|
1066
|
+
/>
|
|
1063
1067
|
|
|
1064
1068
|
<div className="m-9"></div>
|
|
1065
1069
|
<p className="text-black font-bold text-2xl text-center py-2">Dropdown</p>
|