@pelcro/react-pelcro-js 2.6.0 → 2.6.1-beta.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/dist/index.cjs.js CHANGED
@@ -13715,7 +13715,7 @@ const CheckoutForm = () => {
13715
13715
  className: "plc-h-4 plc-w-auto plc-mt-2",
13716
13716
  src: "https://js.pelcro.com/ui/plugin/main/images/credit_cards.png"
13717
13717
  }), /*#__PURE__*/React__default['default'].createElement("div", {
13718
- className: "plc-flex plc-justify-between plc-my-2"
13718
+ className: "plc-flex plc-justify-between plc-my-2 plc-items-end"
13719
13719
  }, /*#__PURE__*/React__default['default'].createElement("div", {
13720
13720
  className: "plc-w-6/12 plc-pr-4"
13721
13721
  }, /*#__PURE__*/React__default['default'].createElement(PelcroCardExpiry, null)), /*#__PURE__*/React__default['default'].createElement("div", {
@@ -15474,13 +15474,11 @@ function Phone({
15474
15474
  const {
15475
15475
  dispatch,
15476
15476
  state: {
15477
- phone: stateValue
15477
+ phone
15478
15478
  }
15479
15479
  } = React.useContext(store);
15480
- const [value, setValue] = React.useState(stateValue);
15481
15480
 
15482
15481
  const handleInputChange = value => {
15483
- setValue(value);
15484
15482
  dispatch({
15485
15483
  type: SET_PHONE,
15486
15484
  payload: value
@@ -15489,7 +15487,7 @@ function Phone({
15489
15487
 
15490
15488
  return /*#__PURE__*/React__default['default'].createElement(Input, Object.assign({
15491
15489
  type: "tel",
15492
- value: value || window.Pelcro.user.read().phone,
15490
+ value: phone,
15493
15491
  onChange: e => handleInputChange(e.target.value)
15494
15492
  }, otherProps));
15495
15493
  }
package/dist/index.esm.js CHANGED
@@ -13685,7 +13685,7 @@ const CheckoutForm = () => {
13685
13685
  className: "plc-h-4 plc-w-auto plc-mt-2",
13686
13686
  src: "https://js.pelcro.com/ui/plugin/main/images/credit_cards.png"
13687
13687
  }), /*#__PURE__*/React__default.createElement("div", {
13688
- className: "plc-flex plc-justify-between plc-my-2"
13688
+ className: "plc-flex plc-justify-between plc-my-2 plc-items-end"
13689
13689
  }, /*#__PURE__*/React__default.createElement("div", {
13690
13690
  className: "plc-w-6/12 plc-pr-4"
13691
13691
  }, /*#__PURE__*/React__default.createElement(PelcroCardExpiry, null)), /*#__PURE__*/React__default.createElement("div", {
@@ -15444,13 +15444,11 @@ function Phone({
15444
15444
  const {
15445
15445
  dispatch,
15446
15446
  state: {
15447
- phone: stateValue
15447
+ phone
15448
15448
  }
15449
15449
  } = useContext(store);
15450
- const [value, setValue] = useState(stateValue);
15451
15450
 
15452
15451
  const handleInputChange = value => {
15453
- setValue(value);
15454
15452
  dispatch({
15455
15453
  type: SET_PHONE,
15456
15454
  payload: value
@@ -15459,7 +15457,7 @@ function Phone({
15459
15457
 
15460
15458
  return /*#__PURE__*/React__default.createElement(Input, Object.assign({
15461
15459
  type: "tel",
15462
- value: value || window.Pelcro.user.read().phone,
15460
+ value: phone,
15463
15461
  onChange: e => handleInputChange(e.target.value)
15464
15462
  }, otherProps));
15465
15463
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pelcro/react-pelcro-js",
3
3
  "description": "Pelcro's React UI Elements",
4
- "version": "2.6.0",
4
+ "version": "2.6.1-beta.1",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",