@weareconceptstudio/account 0.4.3 → 0.4.5
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/modules/cart/CartTemplate/index.d.ts +2 -1
- package/dist/modules/cart/CartTemplate/index.js +2 -2
- package/dist/modules/cart/EmptyCart/icons.d.ts +1 -1
- package/dist/modules/cart/EmptyCart/icons.js +1 -1
- package/dist/modules/cart/EmptyCart/index.d.ts +2 -1
- package/dist/modules/cart/EmptyCart/index.js +3 -3
- package/dist/modules/checkout/ThankYouTemplate/index.d.ts +2 -1
- package/dist/modules/checkout/ThankYouTemplate/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export default CartTemplate;
|
|
2
|
-
declare function CartTemplate({ children, actions, checkoutUrl, moreMenu }: {
|
|
2
|
+
declare function CartTemplate({ children, actions, checkoutUrl, moreMenu, emptyCartIcon }: {
|
|
3
3
|
children: any;
|
|
4
4
|
actions: any;
|
|
5
5
|
checkoutUrl?: string;
|
|
6
6
|
moreMenu: any;
|
|
7
|
+
emptyCartIcon: any;
|
|
7
8
|
}): React.JSX.Element;
|
|
8
9
|
import React from 'react';
|
|
@@ -12,7 +12,7 @@ const leftArrow = (React.createElement("svg", { fill: 'none', viewBox: '0 0 16 1
|
|
|
12
12
|
import CartTemplateStyle from './style';
|
|
13
13
|
//* Skeleton
|
|
14
14
|
import SkeletonCartTemplate from './Skeleton';
|
|
15
|
-
const CartTemplate = ({ children, actions, checkoutUrl = '/checkout/', moreMenu }) => {
|
|
15
|
+
const CartTemplate = ({ children, actions, checkoutUrl = '/checkout/', moreMenu, emptyCartIcon }) => {
|
|
16
16
|
const { shopUrl, useCart } = useAccountContext();
|
|
17
17
|
const { translate } = useTranslation();
|
|
18
18
|
const { items, itemsCount, shippingCost, loading, subtotal, total, freeShippingRange, shippingCostValue } = useCart();
|
|
@@ -33,7 +33,7 @@ const CartTemplate = ({ children, actions, checkoutUrl = '/checkout/', moreMenu
|
|
|
33
33
|
edit: { list: false },
|
|
34
34
|
} }),
|
|
35
35
|
shopUrl ? (React.createElement(AccountButton, { url: shopUrl, btnType: `purple-text`, text: `continueShopping`, className: `continue-shop-text` })) : null,
|
|
36
|
-
moreMenu ? moreMenu : null)) : (React.createElement(EmptyCart, { data: items, shoppingUrl: shopUrl }))) : (React.createElement(SkeletonCartTemplate, { shopUrl: shopUrl }))),
|
|
36
|
+
moreMenu ? moreMenu : null)) : (React.createElement(EmptyCart, { data: items, shoppingUrl: shopUrl, emptyCartIcon: emptyCartIcon }))) : (React.createElement(SkeletonCartTemplate, { shopUrl: shopUrl }))),
|
|
37
37
|
children))));
|
|
38
38
|
};
|
|
39
39
|
export default CartTemplate;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const emptyCartIconDefault: React.JSX.Element;
|
|
2
2
|
import React from 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export const
|
|
2
|
+
export const emptyCartIconDefault = (React.createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', width: '129', height: '181', viewBox: '0 0 129 181' },
|
|
3
3
|
React.createElement("g", { clipPath: 'url(#clip0_2872_19370)' },
|
|
4
4
|
React.createElement("path", { d: 'M107.4 170.413C98.7374 169.552 91.9468 162.232 91.9468 153.353C91.9468 144.474 98.4753 137.445 106.897 136.355L106.743 126.038L97.9344 83.301H14.4453L23.4912 125.548C23.512 125.656 23.5245 125.764 23.5245 125.872V180.963H107.554L107.396 170.421L107.4 170.413Z' }),
|
|
5
5
|
React.createElement("path", { d: 'M0 126.292V180.959H20.4385V126.03L10.3482 78.9113L0 126.292Z' }),
|
|
@@ -3,11 +3,11 @@ import { Text } from '@weareconceptstudio/core';
|
|
|
3
3
|
import { AccountButton } from '../../../components';
|
|
4
4
|
//* Style
|
|
5
5
|
import EmptyCartStyle from './style';
|
|
6
|
-
import {
|
|
7
|
-
const EmptyCart = ({ shoppingUrl }) => {
|
|
6
|
+
import { emptyCartIconDefault } from './icons';
|
|
7
|
+
const EmptyCart = ({ shoppingUrl, emptyCartIcon }) => {
|
|
8
8
|
return (React.createElement(EmptyCartStyle, null,
|
|
9
9
|
React.createElement("div", { className: `empty-cart-wrap` },
|
|
10
|
-
React.createElement("div", { className: 'wrapper-icon' },
|
|
10
|
+
emptyCartIcon ? emptyCartIcon : React.createElement("div", { className: 'wrapper-icon' }, emptyCartIconDefault),
|
|
11
11
|
React.createElement(Text, { tag: `h4`, className: `account-h6 account-font-bold account-primary-color1 empty-cart-title`, text: `cartEmpty` }),
|
|
12
12
|
React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 empty-cart-description`, text: `cartEmptyDesc` }),
|
|
13
13
|
shoppingUrl ? (React.createElement(AccountButton, { text: `shopNow`, url: shoppingUrl, btnType: 'purple-text', className: 'empty-cart-btn' })) : null)));
|
|
@@ -6,7 +6,7 @@ import ThankYouMessageStyle from './style';
|
|
|
6
6
|
import { useAccountContext } from '../../../AccountProvider';
|
|
7
7
|
import { confirmImage } from './icons';
|
|
8
8
|
import AccountContainer from '../../../components/AccountContainer';
|
|
9
|
-
const ThankYouTemplate = ({ orderNumber }) => {
|
|
9
|
+
const ThankYouTemplate = ({ orderNumber, thankIcon }) => {
|
|
10
10
|
const { shopUrl, useCart } = useAccountContext();
|
|
11
11
|
const { translate } = useTranslation();
|
|
12
12
|
const cart = useCart();
|
|
@@ -18,7 +18,7 @@ const ThankYouTemplate = ({ orderNumber }) => {
|
|
|
18
18
|
React.createElement(AccountContainer, { className: 'second-version' },
|
|
19
19
|
React.createElement(Sequence, { step: 'confirmed' }),
|
|
20
20
|
React.createElement("div", { className: `confirmation-wrapper` },
|
|
21
|
-
React.createElement("div", { className: 'confirmation-image' }, confirmImage),
|
|
21
|
+
thankIcon ? thankIcon : React.createElement("div", { className: 'confirmation-image' }, confirmImage),
|
|
22
22
|
React.createElement(Text, { tag: `h6`, className: `account-h6 account-font-bold account-primary-color1 title`, text: `confirmMessageTitle` }),
|
|
23
23
|
React.createElement(Text, { tag: `p`, className: `account-p account-p2 account-font-regular account-primary-color1 description`, text: `confirmMessageDesc` }),
|
|
24
24
|
React.createElement(Text, { tag: `p`, className: `account-p account-p2 account-font-regular account-primary-color1 order-number` }, translate('orderNumber') + ':' + ' ' + orderNumber),
|