sprint-asia-custom-component 0.1.86 → 0.1.88
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/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -14,22 +14,18 @@ import {
|
|
|
14
14
|
IoReturnUpForwardSharp,
|
|
15
15
|
IoAdd,
|
|
16
16
|
} from "react-icons/io5";
|
|
17
|
-
import { PiMicrophone } from "react-icons/pi";
|
|
17
|
+
import { PiMicrophone, PiCopy } from "react-icons/pi";
|
|
18
18
|
import { MdOutlineLabelImportant } from "react-icons/md";
|
|
19
19
|
import { PiCamera } from "react-icons/pi";
|
|
20
20
|
import { BsSticky } from "react-icons/bs";
|
|
21
21
|
import { BsTelephonePlus } from "react-icons/bs";
|
|
22
22
|
import BackgroundWA from "../../assets/images/background_whatsapp.png";
|
|
23
23
|
import PrimaryButton from "../button/primarybutton";
|
|
24
|
+
import VoucherPhoto from "../../assets/images/voucher_photo.jpg";
|
|
25
|
+
import SandezaBills from "../../assets/images/logo_switching_biller_hidden.png";
|
|
26
|
+
import KonnekLogo from "../../assets/images/konnek_logo.png";
|
|
24
27
|
|
|
25
|
-
const CustomPhone = ({
|
|
26
|
-
mode = "Empty",
|
|
27
|
-
data,
|
|
28
|
-
voucherTitle = "Happy Birthday, Congratulation!",
|
|
29
|
-
voucherMessage = "You've won a Voucher Belanja MAP Rp100.000 as a special birthday gift from us. Enjoy your day with extra joy!",
|
|
30
|
-
voucherBackgroundType = "color",
|
|
31
|
-
voucherBackground,
|
|
32
|
-
}) => {
|
|
28
|
+
const CustomPhone = ({ mode = "Empty", data }) => {
|
|
33
29
|
return (
|
|
34
30
|
<div
|
|
35
31
|
style={{ width: "250px", height: "500px", border: "10px solid #000", position: "relative", borderRadius: "25px" }}
|
|
@@ -61,7 +57,7 @@ const CustomPhone = ({
|
|
|
61
57
|
<div className="h-full w-full bg-white flex justify-center items-center text-center">
|
|
62
58
|
<div>
|
|
63
59
|
<div className="flex justify-center">
|
|
64
|
-
<img src={LogoEmptyVoucher} className="w-16 h-16 mb-2" />
|
|
60
|
+
<img alt="voucher-img" src={LogoEmptyVoucher} className="w-16 h-16 mb-2" />
|
|
65
61
|
</div>
|
|
66
62
|
<div className="w-32">
|
|
67
63
|
<p className="font-semibold text-xs">Please click voucher!</p>
|
|
@@ -77,7 +73,7 @@ const CustomPhone = ({
|
|
|
77
73
|
<div className="w-full bg-neutral20 pt-6 px-2 pb-1 flex justify-between items-center">
|
|
78
74
|
<div className="flex items-center">
|
|
79
75
|
<IoIosArrowBack className="w-4 h-4 text-info500 mr-1" />
|
|
80
|
-
<img src={LogoPrezentHidden} className="rounded-full w-5 h-5 bg-white mx-2 p-0.5" />
|
|
76
|
+
<img alt="prezent-logo" src={LogoPrezentHidden} className="rounded-full w-5 h-5 bg-white mx-2 p-0.5" />
|
|
81
77
|
<div>
|
|
82
78
|
<p className="text-xs text-bold">Prezent</p>
|
|
83
79
|
<p className="text-neutral80" style={{ fontSize: "8px" }}>
|
|
@@ -88,7 +84,11 @@ const CustomPhone = ({
|
|
|
88
84
|
<BsTelephonePlus className="w-4 h-4 text-info500" />
|
|
89
85
|
</div>
|
|
90
86
|
<div className="relative w-full h-screen">
|
|
91
|
-
<img
|
|
87
|
+
<img
|
|
88
|
+
alt="background-img"
|
|
89
|
+
src={BackgroundWA}
|
|
90
|
+
className="absolute top-0 left-0 w-full h-full object-cover"
|
|
91
|
+
/>
|
|
92
92
|
<div className="relative z-10 px-3 py-2">
|
|
93
93
|
<div className="flex justify-center">
|
|
94
94
|
<div className="bg-info50 px-6 rounded w-fit">
|
|
@@ -134,59 +134,74 @@ const CustomPhone = ({
|
|
|
134
134
|
{mode === "Voucher" && (
|
|
135
135
|
<div className="h-screen">
|
|
136
136
|
<div className="overflow-y-auto no-scrollbar" style={{ height: "450px" }}>
|
|
137
|
-
{voucherBackgroundType === "color" && (
|
|
138
|
-
<div className="w-full h-54 pt-6 pb-4" style={{ background: voucherBackground || "black" }}>
|
|
139
|
-
<
|
|
140
|
-
<p className="font-semibold text-sm">Voucher Belanja MAP</p>
|
|
141
|
-
<p className="font-semibold text-sm">Rp 100.000</p>
|
|
142
|
-
<p className="font-normal text-neutral100 mt-1 text-xs" style={{ fontSize: "10px" }}>
|
|
143
|
-
Order ID: 12345
|
|
144
|
-
</p>
|
|
145
|
-
<div className="flex justify-between items-center">
|
|
146
|
-
<p className="text-xs" style={{ fontSize: "10px" }}>
|
|
147
|
-
21 Jan 2022 - 22 Mar 2023
|
|
148
|
-
</p>
|
|
149
|
-
<div className="w-12 h-12 rounded-full bg-primary500"></div>
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
137
|
+
{data?.voucherBackgroundType === "color" && (
|
|
138
|
+
<div className="w-full h-54 pt-6 pb-4" style={{ background: data?.voucherBackground || "black" }}>
|
|
139
|
+
<img alt="voucher-img" src={data?.voucherPhoto || VoucherPhoto} className="rounded-md mt-12" />
|
|
152
140
|
</div>
|
|
153
141
|
)}
|
|
154
142
|
|
|
155
|
-
{voucherBackgroundType === "image" && (
|
|
143
|
+
{data?.voucherBackgroundType === "image" && (
|
|
156
144
|
<div
|
|
157
|
-
className="w-full h-54 pt-6 pb-4"
|
|
158
|
-
style={{ backgroundImage: `url(${voucherBackground})`, backgroundSize: "cover" }}
|
|
145
|
+
className="w-full h-54 pt-6 pb-4 px-4"
|
|
146
|
+
style={{ backgroundImage: `url(${data?.voucherBackground})`, backgroundSize: "cover" }}
|
|
159
147
|
>
|
|
160
|
-
<
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
148
|
+
<img alt="voucher-img" src={data?.voucherPhoto || VoucherPhoto} className="rounded-md mt-12" />
|
|
149
|
+
</div>
|
|
150
|
+
)}
|
|
151
|
+
<div className="bg-white p-3 flex flex-row gap-1 items-center">
|
|
152
|
+
<img
|
|
153
|
+
alt="client-logo"
|
|
154
|
+
src={data?.clientLogo || SandezaBills}
|
|
155
|
+
className="rounded-md h-9 w-9 object-cover"
|
|
156
|
+
/>
|
|
157
|
+
<div>
|
|
158
|
+
<p className="text-xs font-semibold">{data?.productName}</p>
|
|
159
|
+
<div className="flex items-center gap-1">
|
|
160
|
+
<p className="text-neutral300" style={{ fontSize: "10px" }}>
|
|
161
|
+
Order ID : {data?.orderNumber}
|
|
165
162
|
</p>
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
21 Jan 2022 - 22 Mar 2023
|
|
169
|
-
</p>
|
|
170
|
-
<div className="w-12 h-12 rounded-full bg-primary500"></div>
|
|
171
|
-
</div>
|
|
163
|
+
|
|
164
|
+
<PiCopy size={14} className="text-neutral300 cursor-pointer" />
|
|
172
165
|
</div>
|
|
166
|
+
<p className="text-neutral300" style={{ fontSize: "10px" }}>
|
|
167
|
+
Valid until {data?.validDate}
|
|
168
|
+
</p>
|
|
173
169
|
</div>
|
|
174
|
-
)}
|
|
175
|
-
<div className="bg-white p-3">
|
|
176
|
-
<p className="text-md font-semibold">{voucherTitle}</p>
|
|
177
|
-
<p className="text-neutral300" style={{ fontSize: "10px" }}>
|
|
178
|
-
{voucherMessage}
|
|
179
|
-
</p>
|
|
180
170
|
</div>
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
<
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
171
|
+
|
|
172
|
+
<div className="bg-neutral20 p-3 pb-8 flex flex-col gap-4">
|
|
173
|
+
<div>
|
|
174
|
+
<p className="text-sm font-semibold">{data?.voucherTitle}</p>
|
|
175
|
+
<p className="text-neutral300 mt-1" style={{ fontSize: "10px" }}>
|
|
176
|
+
{data?.voucherMessage}
|
|
177
|
+
</p>
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
<div>
|
|
181
|
+
<p className="text-xs font-semibold">Description</p>
|
|
182
|
+
<p className="text-neutral300 mt-1" style={{ fontSize: "10px" }}>
|
|
183
|
+
{data?.voucherDescription}
|
|
184
|
+
</p>
|
|
185
|
+
</div>
|
|
186
|
+
|
|
187
|
+
<div>
|
|
188
|
+
<p className="text-xs font-semibold">How to redeem</p>
|
|
189
|
+
<p className="text-neutral300 mt-1" style={{ fontSize: "10px" }}>
|
|
190
|
+
{data?.howToRedeem}
|
|
191
|
+
</p>
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
<div>
|
|
195
|
+
<p className="text-xs font-semibold">Terms & conditions</p>
|
|
196
|
+
<p className="text-neutral300 mt-1" style={{ fontSize: "10px" }}>
|
|
197
|
+
{data?.terms}
|
|
198
|
+
</p>
|
|
199
|
+
</div>
|
|
200
|
+
</div>
|
|
201
|
+
|
|
202
|
+
<div className="w-12 h-12 rounded-full bg-primary50 absolute bottom-0 right-0 mb-12 mr-2 flex justify-center items-center">
|
|
203
|
+
<img alt="konnek-logo" src={KonnekLogo} className="w-6 h-6" />
|
|
188
204
|
</div>
|
|
189
|
-
<div className="w-12 h-12 rounded-full bg-primary500 absolute bottom-0 right-0 mb-12 mr-2"></div>
|
|
190
205
|
<div className="w-full bg-white absolute bottom-0 p-2 rounded-md-lb rounded-b-xl">
|
|
191
206
|
<PrimaryButton title="Redeem Voucher" type="full" size="small" />
|
|
192
207
|
</div>
|
|
@@ -217,7 +232,7 @@ const CustomPhone = ({
|
|
|
217
232
|
</div>
|
|
218
233
|
<div className="w-full bg-white pt-2 px-2 flex justify-between items-center">
|
|
219
234
|
<div className="flex items-center ml-1">
|
|
220
|
-
<img src={LogoPrezentHidden} className="rounded-full w-5 h-5 bg-white" />
|
|
235
|
+
<img alt="prezent-logo" src={LogoPrezentHidden} className="rounded-full w-5 h-5 bg-white" />
|
|
221
236
|
<div className="ml-1">
|
|
222
237
|
<p className="font-semibold" style={{ fontSize: "10px" }}>
|
|
223
238
|
Prezent@sprint.id
|
|
@@ -271,7 +286,7 @@ const CustomPhone = ({
|
|
|
271
286
|
<IoIosArrowBack className="w-5 h-5 text-primary300 mt-2" />
|
|
272
287
|
<div>
|
|
273
288
|
<div className="flex justify-center mt-2">
|
|
274
|
-
<img src={LogoPrezentHidden} className="rounded-full w-8 h-8 bg-white" />
|
|
289
|
+
<img alt="prezent-logo" src={LogoPrezentHidden} className="rounded-full w-8 h-8 bg-white" />
|
|
275
290
|
</div>
|
|
276
291
|
<p className="mb-1" style={{ fontSize: "10px" }}>
|
|
277
292
|
Prezent
|
|
@@ -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
|
@@ -844,13 +844,22 @@ const Templates = () => {
|
|
|
844
844
|
<CustomPhone mode="SMS" data="Ini message" />
|
|
845
845
|
<CustomPhone mode="Email" data="Ini message" />
|
|
846
846
|
<CustomPhone
|
|
847
|
+
data={{
|
|
848
|
+
productName: "Voucher MAP 100.000",
|
|
849
|
+
orderNumber: "1234567890",
|
|
850
|
+
validDate: "29 December 2024",
|
|
851
|
+
voucherDescription:
|
|
852
|
+
"MAP Gift Voucher is the official gift voucher of PT Mitra Adiperkasa Tbk. Accepted in2 retail stores managed under MAP Group Indonesia, with a wide range of product brands. It is a perfect gift for Birthdays, Annivesaries, Valentines, Holidays, Festivals",
|
|
853
|
+
voucherBackgroundType: "image",
|
|
854
|
+
voucherBackground:
|
|
855
|
+
"https://static.promediateknologi.id/crop/0x0:0x0/0x0/webp/photo/jawapos/2022/09/one-piece-red.jpeg",
|
|
856
|
+
|
|
857
|
+
voucherTitle: "One Piece Special Edition!",
|
|
858
|
+
voucherMessage: "This is One Piece special edition card",
|
|
859
|
+
howToRedeem: "This is how to redeem",
|
|
860
|
+
terms: "This is terms and conditions",
|
|
861
|
+
}}
|
|
847
862
|
mode="Voucher"
|
|
848
|
-
voucherBackgroundType="image"
|
|
849
|
-
voucherBackground={
|
|
850
|
-
"https://static.promediateknologi.id/crop/0x0:0x0/0x0/webp/photo/jawapos/2022/09/one-piece-red.jpeg"
|
|
851
|
-
}
|
|
852
|
-
voucherTitle="One Piece Special Edition!"
|
|
853
|
-
voucherMessage="This is One Piece special edition card"
|
|
854
863
|
/>
|
|
855
864
|
</div>
|
|
856
865
|
|
|
@@ -1059,7 +1068,11 @@ const Templates = () => {
|
|
|
1059
1068
|
|
|
1060
1069
|
<div className="m-9"></div>
|
|
1061
1070
|
<p className="text-black font-bold text-2xl text-center py-2">Description</p>
|
|
1062
|
-
<Description
|
|
1071
|
+
<Description
|
|
1072
|
+
title="Sample Title"
|
|
1073
|
+
// value="This is a sample description."
|
|
1074
|
+
image="https://static.promediateknologi.id/crop/0x0:0x0/0x0/webp/photo/jawapos/2022/09/one-piece-red.jpeg"
|
|
1075
|
+
/>
|
|
1063
1076
|
|
|
1064
1077
|
<div className="m-9"></div>
|
|
1065
1078
|
<p className="text-black font-bold text-2xl text-center py-2">Dropdown</p>
|