blob: 7770d3721e5320af08a27a9c1e6cd886c895a61d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
|
import React from 'react';
import Image from 'next/image';
import { InfoIcon } from "lucide-react";
import MobileView from '../../../../src/core/components/views/MobileView';
import DesktopView from '@/core/components/views/DesktopView';
import { Swiper, SwiperProps, SwiperSlide } from 'swiper/react';
import 'swiper/css';
const PromotionProgram = ({ selectedPromo, onSelectPromo }) => {
return (
<>
<div className="text-h-sm md:text-h-lg font-semibold py-4">Serba Serbi Promo</div>
<div className='px-4 sm:px-0'>
<DesktopView>
<div className='grid md:grid-cols-3 grid-cols-2 justify-between h-[90px] gap-3 items-center'>
{/* <div className='w-full h-full '>
<div
onClick={() => onSelectPromo('Diskon')}
className={`border p-2 flex items-center gap-x-2 rounded-lg cursor-pointer ${selectedPromo === 'Diskon' ? 'bg-red-50 border-red-500 text-red-500' : 'border-gray-200 text-gray-900'}`}
>
<div>
<Image
width={24}
height={24}
quality={100}
src='/images/icon_promo/diskon.svg'
alt=''
className='h-12 w-12 rounded'
/>
</div>
<div>
<div className='flex w-full flex-row items-center justify-start'>
<h1 className={`mr-1 font-semibold text-base ${selectedPromo === 'Diskon' ? 'text-red-500' : 'text-gray-900'}`}>Spesial Diskon</h1>
<InfoIcon className='mt-[1px] text-red-500' size={14} />
</div>
<p className={`text-xs md:text-sm ${selectedPromo === 'Diskon' ? 'text-red-500' : 'text-gray-500'}`}>
Harga lebih murah dan pasti makin hemat belinya..
</p>
</div>
</div>
</div> */}
<div className='w-full h-full '>
<div
onClick={() => onSelectPromo('Bundling')}
className={`border h-full p-2 flex items-center gap-x-2 rounded-lg cursor-pointer ${selectedPromo === 'Bundling' ? 'bg-red-50 border-red-500 text-red-500' : 'border-gray-200 text-gray-900'}`}
>
<div>
<Image
width={24}
height={24}
quality={100}
src='/images/icon_promo/silat.svg'
alt=''
className='h-12 w-12 rounded'
/>
</div>
<div>
<div className='flex w-full flex-row items-center justify-start'>
<h1 className={`mr-1 font-semibold text-base ${selectedPromo === 'Bundling' ? 'text-red-500' : 'text-gray-900'}`}>Paket Silat</h1>
<InfoIcon className='mt-[1px] text-red-500' size={14} />
</div>
<p className={`text-xs md:text-sm ${selectedPromo === 'Bundling' ? 'text-red-500' : 'text-gray-500'}`}>
Pilihan bundling barang kombinasi Silat.
</p>
</div>
</div>
</div>
<div className='w-full h-full '>
<div
onClick={() => onSelectPromo('Loading')}
className={`border p-2 h-full flex items-center gap-x-2 rounded-lg cursor-pointer ${selectedPromo === 'Loading' ? 'bg-red-50 border-red-500 text-red-500' : 'border-gray-200 text-gray-900'}`}
>
<div>
<Image
width={24}
height={24}
quality={100}
src='/images/icon_promo/barong.svg'
alt=''
className='h-12 w-12 rounded'
/>
</div>
<div>
<div className='flex w-full flex-row items-center justify-start'>
<h1 className={`mr-1 font-semibold text-base ${selectedPromo === 'Loading' ? 'text-red-500' : 'text-gray-900'}`}>Paket Barong</h1>
<InfoIcon className='mt-[1px] text-red-500' size={14} />
</div>
<p className={`text-xs md:text-sm ${selectedPromo === 'Loading' ? 'text-red-500' : 'text-gray-500'}`}>
Beli banyak barang/partai barang borong.
</p>
</div>
</div>
</div>
<div className='w-full h-full '>
<div
onClick={() => onSelectPromo('Merchandise')}
className={`border p-2 h-full flex items-center gap-x-2 rounded-lg cursor-pointer ${selectedPromo === 'Merchandise' ? 'bg-red-50 border-red-500 text-red-500' : 'border-gray-200 text-gray-900'}`}
>
<div>
<Image
width={24}
height={24}
quality={100}
src='/images/icon_promo/angklung.svg'
alt=''
className='h-12 w-12 rounded'
/>
</div>
<div >
<div className='flex w-full flex-row items-center justify-start '>
<h1 className={`mr-1 font-semibold text-base ${selectedPromo === 'Merchandise' ? 'text-red-500' : 'text-gray-900'}`}>Paket Angklung</h1>
<InfoIcon className='mt-[1px] text-red-500' size={14} />
</div>
<p className={` m1 text-xs md:text-sm ${selectedPromo === 'Merchandise' ? 'text-red-500' : 'text-gray-500'}`}>
Gratis barang promosi/merchandise menang langsung.
</p>
</div>
</div>
</div>
</div>
</DesktopView>
<MobileView>
<Swiper slidesPerView={1.75} spaceBetween={10}>
<SwiperSlide>
<div className='w-full h-full '>
<div
onClick={() => onSelectPromo('Bundling')}
className={`border h-full p-1 flex items-center gap-x-2 rounded-lg cursor-pointer ${selectedPromo === 'Bundling' ? 'bg-red-50 border-red-500 text-red-500' : 'border-gray-200 text-gray-900'}`}
>
<div>
<Image
width={24}
height={24}
quality={100}
src='/images/icon_promo/silat.svg'
alt=''
className='h-12 w-12 rounded'
/>
</div>
<div >
<div className='flex w-full flex-row items-center justify-start'>
<h1 className={`mr-1 font-semibold text-base ${selectedPromo === 'Bundling' ? 'text-red-500' : 'text-gray-900'}`}>Paket Silat</h1>
<InfoIcon className='mt-[1px] text-red-500' size={14} />
</div>
<p className={`text-xs md:text-sm ${selectedPromo === 'Bundling' ? 'text-red-500' : 'text-gray-500'}`}>
Pilihan bundling barang kombinasi Silat.
</p>
</div>
</div>
</div>
</SwiperSlide>
<SwiperSlide>
<div className='w-full h-full '>
<div
onClick={() => onSelectPromo('Loading')}
className={`border p-2 h-full flex items-center gap-x-2 rounded-lg cursor-pointer ${selectedPromo === 'Loading' ? 'bg-red-50 border-red-500 text-red-500' : 'border-gray-200 text-gray-900'}`}
>
<div>
<Image
width={24}
height={24}
quality={100}
src='/images/icon_promo/barong.svg'
alt=''
className='h-12 w-12 rounded'
/>
</div>
<div>
<div className='flex w-full flex-row items-center justify-start'>
<h1 className={`mr-1 font-semibold text-base ${selectedPromo === 'Loading' ? 'text-red-500' : 'text-gray-900'}`}>Paket Barong</h1>
<InfoIcon className='mt-[1px] text-red-500' size={14} />
</div>
<p className={`text-xs md:text-sm ${selectedPromo === 'Loading' ? 'text-red-500' : 'text-gray-500'}`}>
Beli banyak barang/partai barang borong.
</p>
</div>
</div>
</div>
</SwiperSlide>
<SwiperSlide>
<div className='w-full h-full '>
<div
onClick={() => onSelectPromo('Merchandise')}
className={`border p-2 h-full flex items-center gap-x-2 rounded-lg cursor-pointer ${selectedPromo === 'Merchandise' ? 'bg-red-50 border-red-500 text-red-500' : 'border-gray-200 text-gray-900'}`}
>
<div>
<Image
width={24}
height={24}
quality={100}
src='/images/icon_promo/angklung.svg'
alt=''
className='h-12 w-12 rounded'
/>
</div>
<div >
<div className='flex w-full flex-row items-center justify-start '>
<h1 className={`mr-1 font-semibold text-base ${selectedPromo === 'Merchandise' ? 'text-red-500' : 'text-gray-900'}`}>Paket Angklung</h1>
<InfoIcon className='mt-[1px] text-red-500' size={14} />
</div>
<p className={` m1 text-xs md:text-sm ${selectedPromo === 'Merchandise' ? 'text-red-500' : 'text-gray-500'}`}>
Gratis barang promosi/merchandise menang langsung.
</p>
</div>
</div>
</div>
</SwiperSlide>
</Swiper>
</MobileView>
</div>
</>
);
};
export default PromotionProgram;
|