ordering-ui-external 1.3.2 → 1.4.1
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/_bundles/0.ordering-ui.eec38d66166bc4458215.js +1 -0
- package/_bundles/{0.ordering-ui.8d3ec9f208550df10621.js → 1.ordering-ui.eec38d66166bc4458215.js} +1 -1
- package/_bundles/{1.ordering-ui.8d3ec9f208550df10621.js → 2.ordering-ui.eec38d66166bc4458215.js} +1 -1
- package/_bundles/{4.ordering-ui.8d3ec9f208550df10621.js → 4.ordering-ui.eec38d66166bc4458215.js} +1 -1
- package/_bundles/{5.ordering-ui.8d3ec9f208550df10621.js → 5.ordering-ui.eec38d66166bc4458215.js} +1 -1
- package/_bundles/{6.ordering-ui.8d3ec9f208550df10621.js → 6.ordering-ui.eec38d66166bc4458215.js} +1 -1
- package/_bundles/7.ordering-ui.eec38d66166bc4458215.js +2 -0
- package/_bundles/{7.ordering-ui.8d3ec9f208550df10621.js.LICENSE.txt → 7.ordering-ui.eec38d66166bc4458215.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.8d3ec9f208550df10621.js → 8.ordering-ui.eec38d66166bc4458215.js} +1 -1
- package/_bundles/{9.ordering-ui.8d3ec9f208550df10621.js → 9.ordering-ui.eec38d66166bc4458215.js} +1 -1
- package/_bundles/ordering-ui.eec38d66166bc4458215.js +2 -0
- package/_bundles/{ordering-ui.8d3ec9f208550df10621.js.LICENSE.txt → ordering-ui.eec38d66166bc4458215.js.LICENSE.txt} +0 -0
- package/_modules/themes/five/index.js +7 -0
- package/_modules/themes/five/src/components/BusinessListingSearch/MaxSectionItem/index.js +47 -0
- package/_modules/themes/five/src/components/BusinessListingSearch/index.js +14 -29
- package/_modules/themes/five/src/components/BusinessProductsList/index.js +10 -6
- package/_modules/themes/five/src/components/BusinessProductsList/styles.js +8 -7
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +3 -3
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +4 -1
- package/_modules/themes/five/src/components/Cart/index.js +3 -1
- package/_modules/themes/five/src/components/Checkout/index.js +52 -39
- package/_modules/themes/five/src/components/Favorite/index.js +16 -2
- package/_modules/themes/five/src/components/FavoriteList/index.js +15 -1
- package/_modules/themes/five/src/components/Header/index.js +2 -2
- package/_modules/themes/five/src/components/Header/styles.js +5 -3
- package/_modules/themes/five/src/components/Modal/index.js +2 -2
- package/_modules/themes/five/src/components/Modal/styles.js +8 -4
- package/_modules/themes/five/src/components/MyOrders/index.js +9 -2
- package/_modules/themes/five/src/components/OrderDetails/ActionsSection.js +1 -0
- package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +10 -40
- package/_modules/themes/five/src/components/OrdersOption/PreviousProfessionalOrdered/index.js +25 -0
- package/_modules/themes/five/src/components/OrdersOption/PreviousProfessionalOrdered/styles.js +19 -0
- package/_modules/themes/five/src/components/OrdersOption/index.js +16 -13
- package/_modules/themes/five/src/components/ProductForm/index.js +5 -5
- package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +1 -1
- package/_modules/themes/five/src/components/SidebarMenu/index.js +39 -17
- package/_modules/themes/five/src/components/SingleProductCard/styles.js +1 -1
- package/_modules/themes/five/src/components/SingleProfessionalCard/index.js +95 -0
- package/_modules/themes/five/src/components/SingleProfessionalCard/styles.js +47 -0
- package/_modules/themes/five/src/styles/Selects/index.js +1 -1
- package/index-template.js +28 -5
- package/package.json +6 -3
- package/src/themes/five/index.js +2 -0
- package/src/themes/five/src/components/BusinessListingSearch/MaxSectionItem/index.js +44 -0
- package/src/themes/five/src/components/BusinessListingSearch/index.js +8 -30
- package/src/themes/five/src/components/BusinessProductsList/index.js +29 -22
- package/src/themes/five/src/components/BusinessProductsList/styles.js +25 -2
- package/src/themes/five/src/components/BusinessProductsListing/index.js +1 -1
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +4 -3
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
- package/src/themes/five/src/components/Cart/index.js +2 -0
- package/src/themes/five/src/components/Checkout/index.js +22 -14
- package/src/themes/five/src/components/Favorite/index.js +19 -1
- package/src/themes/five/src/components/FavoriteList/index.js +24 -0
- package/src/themes/five/src/components/Header/index.js +11 -8
- package/src/themes/five/src/components/Header/styles.js +5 -0
- package/src/themes/five/src/components/Modal/index.js +9 -6
- package/src/themes/five/src/components/Modal/styles.js +15 -1
- package/src/themes/five/src/components/MyOrders/index.js +11 -1
- package/src/themes/five/src/components/OrderDetails/ActionsSection.js +1 -0
- package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +8 -29
- package/src/themes/five/src/components/OrdersOption/PreviousProfessionalOrdered/index.js +32 -0
- package/src/themes/five/src/components/OrdersOption/PreviousProfessionalOrdered/styles.js +38 -0
- package/src/themes/five/src/components/OrdersOption/index.js +18 -9
- package/src/themes/five/src/components/ProductForm/index.js +5 -5
- package/src/themes/five/src/components/RenderProductsLayout/styles.js +1 -1
- package/src/themes/five/src/components/SidebarMenu/index.js +98 -42
- package/src/themes/five/src/components/SingleProductCard/styles.js +5 -1
- package/src/themes/five/src/components/SingleProfessionalCard/index.js +82 -0
- package/src/themes/five/src/components/SingleProfessionalCard/styles.js +92 -0
- package/src/themes/five/src/styles/Selects/index.js +1 -0
- package/template/Utils/index.js +4 -0
- package/template/app.js +554 -143
- package/template/assets/images/business-hero.jpg +0 -0
- package/template/assets/images/business-signup-background.png +0 -0
- package/template/assets/images/business_signup.png +0 -0
- package/template/assets/images/congratulation_approval.png +0 -0
- package/template/assets/images/congratulation_no_approval.png +0 -0
- package/template/assets/images/credit.png +0 -0
- package/template/assets/images/delivery-types/curbside.jpg +0 -0
- package/template/assets/images/delivery-types/delivery.jpg +0 -0
- package/template/assets/images/delivery-types/drive_thru.jpg +0 -0
- package/template/assets/images/delivery-types/eat_in.jpg +0 -0
- package/template/assets/images/delivery-types/pickup.jpg +0 -0
- package/template/assets/images/driver-signup-background.png +0 -0
- package/template/assets/images/driver-signup-hero.png +0 -0
- package/template/assets/images/driver_congratulation_approval.png +0 -0
- package/template/assets/images/driver_congratulation_no_approval.png +0 -0
- package/template/assets/images/driver_signup.png +0 -0
- package/template/assets/images/home-hero.jpg +0 -0
- package/template/assets/images/loyalty_level.png +0 -0
- package/template/assets/images/mastercard.png +0 -0
- package/template/assets/images/not-found.svg +94 -1
- package/template/assets/images/not-network.svg +226 -1
- package/template/assets/images/visa.png +0 -0
- package/template/components/HelmetTags/index.js +5 -4
- package/template/components/ListenPageChanges/index.js +25 -12
- package/template/components/ScrollToTop/index.js +4 -0
- package/template/config.js +14 -0
- package/template/config.json +1 -0
- package/template/helmetdata.json +91 -28
- package/template/pages/AddressList/index.js +34 -0
- package/template/pages/AddressList/styles.js +43 -0
- package/template/pages/BusinessListingSearch/index.js +106 -0
- package/template/pages/BusinessProductsList/index.js +152 -29
- package/template/pages/BusinessesList/index.js +17 -6
- package/template/pages/Checkout/index.js +14 -4
- package/template/pages/Favorite/index.js +12 -0
- package/template/pages/Help/index.js +7 -2
- package/template/pages/Home/index.js +58 -36
- package/template/pages/Home/styles.js +14 -0
- package/template/pages/MessagesList/index.js +19 -0
- package/template/pages/MultiCheckout/index.js +26 -0
- package/template/pages/MultiOrdersDetails/index.js +21 -0
- package/template/pages/MyOrders/index.js +87 -3
- package/template/pages/OrderDetails/index.js +12 -2
- package/template/pages/Profile/index.js +16 -3
- package/template/pages/Promotions/index.js +13 -0
- package/template/pages/ResetPassword/index.js +15 -9
- package/template/pages/SessionsList/index.js +12 -0
- package/template/pages/SignUpBusiness/index.js +12 -0
- package/template/pages/SignUpDriver/index.js +12 -0
- package/template/pages/UserVerification/index.js +12 -0
- package/template/pages/Wallets/index.js +12 -0
- package/template/service-worker.js +72 -0
- package/template/theme.json +27 -51
- package/_bundles/3.ordering-ui.8d3ec9f208550df10621.js +0 -1
- package/_bundles/7.ordering-ui.8d3ec9f208550df10621.js +0 -2
- package/_bundles/ordering-ui.8d3ec9f208550df10621.js +0 -2
- package/template/assets/images/exclamation.svg +0 -3
- package/template/assets/images/order-creating.png +0 -0
- package/template/assets/images/order-sucess.png +0 -0
|
@@ -11,6 +11,8 @@ import BiStore from '@meronex/icons/bi/BiStore'
|
|
|
11
11
|
import FaUserCircle from '@meronex/icons/fa/FaUserCircle'
|
|
12
12
|
import BiHelpCircle from '@meronex/icons/bi/BiHelpCircle'
|
|
13
13
|
import SiJsonwebtokens from '@meronex/icons/si/SiJsonwebtokens'
|
|
14
|
+
import BiMessageDetail from '@meronex/icons/bi/BiMessageDetail'
|
|
15
|
+
import BsSearch from '@meronex/icons/bs/BsSearch'
|
|
14
16
|
import { Heart, Tag } from 'react-bootstrap-icons'
|
|
15
17
|
|
|
16
18
|
import { useEvent, useLanguage, useOrder, useSession, useConfig } from 'ordering-components-external'
|
|
@@ -196,6 +198,64 @@ export const SidebarMenu = (props) => {
|
|
|
196
198
|
|
|
197
199
|
{auth && (
|
|
198
200
|
<>
|
|
201
|
+
<MenuLink
|
|
202
|
+
onClick={() => handleGoToPage({ page: 'business_search' })}
|
|
203
|
+
>
|
|
204
|
+
<WrappContent>
|
|
205
|
+
<MenuLinkIcon
|
|
206
|
+
active={
|
|
207
|
+
window.location.pathname === '/business_search'
|
|
208
|
+
}
|
|
209
|
+
>
|
|
210
|
+
<BsSearch />
|
|
211
|
+
</MenuLinkIcon>
|
|
212
|
+
<MenuLinkText>
|
|
213
|
+
<TextInfo
|
|
214
|
+
active={
|
|
215
|
+
window.location.pathname === '/business_search'
|
|
216
|
+
}
|
|
217
|
+
>
|
|
218
|
+
{t('BROWSE_SEARCH', 'Browse & Search')}
|
|
219
|
+
</TextInfo>
|
|
220
|
+
</MenuLinkText>
|
|
221
|
+
<MenuLinkSeparator>
|
|
222
|
+
<div>
|
|
223
|
+
<hr />
|
|
224
|
+
</div>
|
|
225
|
+
</MenuLinkSeparator>
|
|
226
|
+
</WrappContent>
|
|
227
|
+
</MenuLink>
|
|
228
|
+
{
|
|
229
|
+
!isCustomerMode && (
|
|
230
|
+
<MenuLink
|
|
231
|
+
onClick={() => handleGoToPage({ page: 'orders' })}
|
|
232
|
+
>
|
|
233
|
+
<WrappContent>
|
|
234
|
+
<MenuLinkIcon
|
|
235
|
+
active={
|
|
236
|
+
window.location.pathname === '/profile/orders'
|
|
237
|
+
}
|
|
238
|
+
>
|
|
239
|
+
<FaRegListAlt />
|
|
240
|
+
</MenuLinkIcon>
|
|
241
|
+
<MenuLinkText>
|
|
242
|
+
<TextInfo
|
|
243
|
+
active={
|
|
244
|
+
window.location.pathname === '/profile/orders'
|
|
245
|
+
}
|
|
246
|
+
>
|
|
247
|
+
{t('ORDERS', 'Orders')}
|
|
248
|
+
</TextInfo>
|
|
249
|
+
</MenuLinkText>
|
|
250
|
+
<MenuLinkSeparator>
|
|
251
|
+
<div>
|
|
252
|
+
<hr />
|
|
253
|
+
</div>
|
|
254
|
+
</MenuLinkSeparator>
|
|
255
|
+
</WrappContent>
|
|
256
|
+
</MenuLink>
|
|
257
|
+
)
|
|
258
|
+
}
|
|
199
259
|
<MenuLink
|
|
200
260
|
onClick={() => handleGoToPage({ page: 'profile' })}
|
|
201
261
|
>
|
|
@@ -213,7 +273,7 @@ export const SidebarMenu = (props) => {
|
|
|
213
273
|
window.location.pathname === '/profile'
|
|
214
274
|
}
|
|
215
275
|
>
|
|
216
|
-
{t('
|
|
276
|
+
{t('VIEW_ACCOUNT', 'View account')}
|
|
217
277
|
</TextInfo>
|
|
218
278
|
</MenuLinkText>
|
|
219
279
|
<MenuLinkSeparator>
|
|
@@ -283,23 +343,23 @@ export const SidebarMenu = (props) => {
|
|
|
283
343
|
)}
|
|
284
344
|
|
|
285
345
|
<MenuLink
|
|
286
|
-
onClick={() => handleGoToPage({ page: '
|
|
346
|
+
onClick={() => handleGoToPage({ page: 'messages' })}
|
|
287
347
|
>
|
|
288
348
|
<WrappContent>
|
|
289
349
|
<MenuLinkIcon
|
|
290
350
|
active={
|
|
291
|
-
window.location.pathname === '/
|
|
351
|
+
window.location.pathname === '/messages'
|
|
292
352
|
}
|
|
293
353
|
>
|
|
294
|
-
<
|
|
354
|
+
<BiMessageDetail />
|
|
295
355
|
</MenuLinkIcon>
|
|
296
356
|
<MenuLinkText>
|
|
297
357
|
<TextInfo
|
|
298
358
|
active={
|
|
299
|
-
window.location.pathname === '/
|
|
359
|
+
window.location.pathname === '/messages'
|
|
300
360
|
}
|
|
301
361
|
>
|
|
302
|
-
{t('
|
|
362
|
+
{t('MESSAGES', 'Messages')}
|
|
303
363
|
</TextInfo>
|
|
304
364
|
</MenuLinkText>
|
|
305
365
|
<MenuLinkSeparator>
|
|
@@ -309,24 +369,25 @@ export const SidebarMenu = (props) => {
|
|
|
309
369
|
</MenuLinkSeparator>
|
|
310
370
|
</WrappContent>
|
|
311
371
|
</MenuLink>
|
|
372
|
+
|
|
312
373
|
<MenuLink
|
|
313
|
-
onClick={() => handleGoToPage({ page: '
|
|
374
|
+
onClick={() => handleGoToPage({ page: 'help' })}
|
|
314
375
|
>
|
|
315
376
|
<WrappContent>
|
|
316
377
|
<MenuLinkIcon
|
|
317
378
|
active={
|
|
318
|
-
window.location.pathname === '/
|
|
379
|
+
window.location.pathname === '/help'
|
|
319
380
|
}
|
|
320
381
|
>
|
|
321
|
-
<
|
|
382
|
+
<BiHelpCircle />
|
|
322
383
|
</MenuLinkIcon>
|
|
323
384
|
<MenuLinkText>
|
|
324
385
|
<TextInfo
|
|
325
386
|
active={
|
|
326
|
-
window.location.pathname === '/
|
|
387
|
+
window.location.pathname === '/help'
|
|
327
388
|
}
|
|
328
389
|
>
|
|
329
|
-
{t('
|
|
390
|
+
{t('HELP', 'help')}
|
|
330
391
|
</TextInfo>
|
|
331
392
|
</MenuLinkText>
|
|
332
393
|
<MenuLinkSeparator>
|
|
@@ -363,38 +424,33 @@ export const SidebarMenu = (props) => {
|
|
|
363
424
|
</MenuLinkSeparator>
|
|
364
425
|
</WrappContent>
|
|
365
426
|
</MenuLink>
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
427
|
+
<MenuLink
|
|
428
|
+
onClick={() => handleGoToPage({ page: 'favorite' })}
|
|
429
|
+
>
|
|
430
|
+
<WrappContent>
|
|
431
|
+
<MenuLinkIcon
|
|
432
|
+
active={
|
|
433
|
+
window.location.pathname === '/favorite'
|
|
434
|
+
}
|
|
370
435
|
>
|
|
371
|
-
<
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
<div>
|
|
390
|
-
<hr />
|
|
391
|
-
</div>
|
|
392
|
-
</MenuLinkSeparator>
|
|
393
|
-
</WrappContent>
|
|
394
|
-
</MenuLink>
|
|
395
|
-
)
|
|
396
|
-
}
|
|
397
|
-
|
|
436
|
+
<Heart />
|
|
437
|
+
</MenuLinkIcon>
|
|
438
|
+
<MenuLinkText>
|
|
439
|
+
<TextInfo
|
|
440
|
+
active={
|
|
441
|
+
window.location.pathname === '/favorite'
|
|
442
|
+
}
|
|
443
|
+
>
|
|
444
|
+
{t('FAVORITES', 'Favorites')}
|
|
445
|
+
</TextInfo>
|
|
446
|
+
</MenuLinkText>
|
|
447
|
+
<MenuLinkSeparator>
|
|
448
|
+
<div>
|
|
449
|
+
<hr />
|
|
450
|
+
</div>
|
|
451
|
+
</MenuLinkSeparator>
|
|
452
|
+
</WrappContent>
|
|
453
|
+
</MenuLink>
|
|
398
454
|
<LogoutButton onCustomClick={() => actionSidebar(false)} />
|
|
399
455
|
</>
|
|
400
456
|
)}
|
|
@@ -188,7 +188,11 @@ export const QuantityContainer = styled.div`
|
|
|
188
188
|
height: 25px;
|
|
189
189
|
text-align: center;
|
|
190
190
|
border-radius: 50%;
|
|
191
|
-
transform: translate(-
|
|
191
|
+
transform: translate(-20px, 50%);
|
|
192
|
+
|
|
193
|
+
@media (min-width: 768px) {
|
|
194
|
+
transform: translate(-50%, 50%);
|
|
195
|
+
}
|
|
192
196
|
`
|
|
193
197
|
|
|
194
198
|
export const RibbonBox = styled.div`
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import { InfoCircle, Heart as DisLike, HeartFill as Like } from 'react-bootstrap-icons'
|
|
3
|
+
import { useSession, SingleProfessionalCard as SingleProfessionalCardController } from 'ordering-components-external'
|
|
4
|
+
import Skeleton from 'react-loading-skeleton'
|
|
5
|
+
import { ProfessionalInfo } from '../ProfessionalInfo'
|
|
6
|
+
import { Modal } from '../Modal'
|
|
7
|
+
import {
|
|
8
|
+
Container,
|
|
9
|
+
UserPhoto,
|
|
10
|
+
InfoWrapper,
|
|
11
|
+
ActionWrapper
|
|
12
|
+
} from './styles'
|
|
13
|
+
|
|
14
|
+
const SingleProfessionalCardUI = (props) => {
|
|
15
|
+
const {
|
|
16
|
+
professional,
|
|
17
|
+
isSkeleton,
|
|
18
|
+
handleFavoriteProfessional
|
|
19
|
+
} = props
|
|
20
|
+
|
|
21
|
+
const [{ auth }] = useSession()
|
|
22
|
+
const [open, setOpen] = useState(false)
|
|
23
|
+
|
|
24
|
+
const handleChangeFavorite = () => {
|
|
25
|
+
if (auth) {
|
|
26
|
+
handleFavoriteProfessional && handleFavoriteProfessional(!professional?.favorite)
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const handleOpenProfileInfo = () => {
|
|
31
|
+
setOpen(true)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<>
|
|
36
|
+
<Container>
|
|
37
|
+
{isSkeleton ? (
|
|
38
|
+
<Skeleton style={{ width: '86px', height: '86px' }} />
|
|
39
|
+
) : (
|
|
40
|
+
<UserPhoto bgimage={professional?.photo} />
|
|
41
|
+
)}
|
|
42
|
+
<InfoWrapper>
|
|
43
|
+
<h4>{isSkeleton ? <Skeleton height={18} width={120} /> : <>{professional?.name} {professional?.last_name}</>}</h4>
|
|
44
|
+
{isSkeleton ? <Skeleton height={15} width={80} /> : <>{professional?.occupation?.name && <p>{professional?.occupation?.name}</p>}</>}
|
|
45
|
+
<ActionWrapper>
|
|
46
|
+
{isSkeleton ? (
|
|
47
|
+
<>
|
|
48
|
+
<Skeleton width={16} height={16} />
|
|
49
|
+
<Skeleton width={16} height={16} style={{ margin: '0px 7px' }} />
|
|
50
|
+
</>
|
|
51
|
+
) : (
|
|
52
|
+
<>
|
|
53
|
+
<InfoCircle className='info' onClick={() => handleOpenProfileInfo()} />
|
|
54
|
+
<span onClick={() => handleChangeFavorite()}>
|
|
55
|
+
{professional?.favorite ? <Like /> : <DisLike />}
|
|
56
|
+
</span>
|
|
57
|
+
</>
|
|
58
|
+
)}
|
|
59
|
+
</ActionWrapper>
|
|
60
|
+
</InfoWrapper>
|
|
61
|
+
</Container>
|
|
62
|
+
<Modal
|
|
63
|
+
open={open}
|
|
64
|
+
width='760px'
|
|
65
|
+
padding='0'
|
|
66
|
+
onClose={() => setOpen(false)}
|
|
67
|
+
>
|
|
68
|
+
<ProfessionalInfo
|
|
69
|
+
userId={professional?.id}
|
|
70
|
+
/>
|
|
71
|
+
</Modal>
|
|
72
|
+
</>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const SingleProfessionalCard = (props) => {
|
|
77
|
+
const singleProfessionalCardProps = {
|
|
78
|
+
...props,
|
|
79
|
+
UIComponent: SingleProfessionalCardUI
|
|
80
|
+
}
|
|
81
|
+
return <SingleProfessionalCardController {...singleProfessionalCardProps} />
|
|
82
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);
|
|
6
|
+
border-radius: 4px;
|
|
7
|
+
padding: 12px 14px;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
background-color: ${props => props.theme.colors.backgroundPage};
|
|
11
|
+
border: 1px solid ${props => props.theme.colors.gray200};
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
margin: 10px;
|
|
14
|
+
`
|
|
15
|
+
|
|
16
|
+
const UserPhotoStyled = styled.div`
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
position: relative;
|
|
19
|
+
background-repeat: no-repeat, repeat;
|
|
20
|
+
background-size: cover;
|
|
21
|
+
background-position: center;
|
|
22
|
+
object-fit: cover;
|
|
23
|
+
min-height: 86px;
|
|
24
|
+
width: 86px;
|
|
25
|
+
height: 86px;
|
|
26
|
+
border-radius: 4px;
|
|
27
|
+
|
|
28
|
+
${({ isSkeleton }) => isSkeleton && css`
|
|
29
|
+
background-color: ${props => props.theme.colors.gray200};
|
|
30
|
+
`}
|
|
31
|
+
`
|
|
32
|
+
export const UserPhoto = (props) => {
|
|
33
|
+
const style = {}
|
|
34
|
+
if (props.bgimage) {
|
|
35
|
+
style.backgroundImage = `url(${props.bgimage})`
|
|
36
|
+
}
|
|
37
|
+
return (
|
|
38
|
+
<UserPhotoStyled {...props} style={style}>
|
|
39
|
+
{props.children}
|
|
40
|
+
</UserPhotoStyled>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const InfoWrapper = styled.div`
|
|
45
|
+
width: calc(100% - 106px);
|
|
46
|
+
margin-left: 20px;
|
|
47
|
+
${props => props.theme.rtl && css`
|
|
48
|
+
margin-left: 0px;
|
|
49
|
+
margin-right: 20px;
|
|
50
|
+
`}
|
|
51
|
+
> h4 {
|
|
52
|
+
font-weight: 400;
|
|
53
|
+
font-size: 14px;
|
|
54
|
+
line-height: 24px;
|
|
55
|
+
margin: 0px;
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
text-overflow: ellipsis;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
}
|
|
60
|
+
p {
|
|
61
|
+
margin-top: 2px;
|
|
62
|
+
font-weight: 400;
|
|
63
|
+
font-size: 12px;
|
|
64
|
+
line-height: 22px;
|
|
65
|
+
}
|
|
66
|
+
`
|
|
67
|
+
|
|
68
|
+
export const ActionWrapper = styled.div`
|
|
69
|
+
margin-top: 15px;
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
> .info {
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
font-size: 16px;
|
|
75
|
+
margin-right: 7px;
|
|
76
|
+
${props => props.theme.rtl && css`
|
|
77
|
+
margin-right: 0px;
|
|
78
|
+
margin-left: 7px;
|
|
79
|
+
`}
|
|
80
|
+
}
|
|
81
|
+
> span {
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
svg {
|
|
87
|
+
color: ${props => props.theme.colors.danger500};
|
|
88
|
+
font-size: 16px;
|
|
89
|
+
margin-top: 2px;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
`
|