@weareconceptstudio/account 0.4.3 → 0.4.4

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.
@@ -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 emptyCartIcon: React.JSX.Element;
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 emptyCartIcon = (React.createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', width: '129', height: '181', viewBox: '0 0 129 181' },
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' }),
@@ -1,5 +1,6 @@
1
1
  export default EmptyCart;
2
- declare function EmptyCart({ shoppingUrl }: {
2
+ declare function EmptyCart({ shoppingUrl, emptyCartIcon }: {
3
3
  shoppingUrl: any;
4
+ emptyCartIcon: any;
4
5
  }): React.JSX.Element;
5
6
  import React from 'react';
@@ -3,11 +3,12 @@ import { Text } from '@weareconceptstudio/core';
3
3
  import { AccountButton } from '../../../components';
4
4
  //* Style
5
5
  import EmptyCartStyle from './style';
6
- import { emptyCartIcon } from './icons';
7
- const EmptyCart = ({ shoppingUrl }) => {
6
+ import { emptyCartIconDefault } from './icons';
7
+ const EmptyCart = ({ shoppingUrl, emptyCartIcon }) => {
8
+ console.log(emptyCartIcon);
8
9
  return (React.createElement(EmptyCartStyle, null,
9
10
  React.createElement("div", { className: `empty-cart-wrap` },
10
- React.createElement("div", { className: 'wrapper-icon' }, emptyCartIcon),
11
+ emptyCartIcon ? emptyCartIcon : React.createElement("div", { className: 'wrapper-icon' }, emptyCartIconDefault),
11
12
  React.createElement(Text, { tag: `h4`, className: `account-h6 account-font-bold account-primary-color1 empty-cart-title`, text: `cartEmpty` }),
12
13
  React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 empty-cart-description`, text: `cartEmptyDesc` }),
13
14
  shoppingUrl ? (React.createElement(AccountButton, { text: `shopNow`, url: shoppingUrl, btnType: 'purple-text', className: 'empty-cart-btn' })) : null)));
@@ -1,5 +1,6 @@
1
1
  export default ThankYouTemplate;
2
- declare function ThankYouTemplate({ orderNumber }: {
2
+ declare function ThankYouTemplate({ orderNumber, thankIcon }: {
3
3
  orderNumber: any;
4
+ thankIcon: any;
4
5
  }): React.JSX.Element;
5
6
  import React from 'react';
@@ -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),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weareconceptstudio/account",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Concept Studio Account",
5
5
  "author": "Concept Studio",
6
6
  "license": "ISC",