@rpg-engine/long-bow 0.2.37 → 0.2.39

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.
@@ -29434,7 +29434,7 @@ var TradingMenu = function TradingMenu(_ref) {
29434
29434
  atlasJSON = _ref.atlasJSON,
29435
29435
  atlasIMG = _ref.atlasIMG,
29436
29436
  characterAvailableGold = _ref.characterAvailableGold,
29437
- onChangeTraderItems = _ref.onChangeTraderItems;
29437
+ onConfirm = _ref.onConfirm;
29438
29438
  var _useState = useState(0),
29439
29439
  sum = _useState[0],
29440
29440
  setSum = _useState[1];
@@ -29449,11 +29449,6 @@ var TradingMenu = function TradingMenu(_ref) {
29449
29449
  setSum(newSumArray);
29450
29450
  });
29451
29451
  };
29452
- useEffect(function () {
29453
- if (onChangeTraderItems) {
29454
- onChangeTraderItems(traderItems);
29455
- }
29456
- }, [traderItems]);
29457
29452
  var Capitalize = function Capitalize(word) {
29458
29453
  return word[0].toUpperCase() + word.substring(1);
29459
29454
  };
@@ -29479,9 +29474,15 @@ var TradingMenu = function TradingMenu(_ref) {
29479
29474
  }));
29480
29475
  })), React.createElement(GoldWrapper, null, React.createElement("p", null, "Available Gold:"), React.createElement("p", null, "$", characterAvailableGold)), React.createElement(TotalWrapper, null, React.createElement("p", null, "Total:"), React.createElement("p", null, "$", sum)), sum > characterAvailableGold ? React.createElement(AlertWrapper, null, React.createElement("p", null, " Sorry, not enough money.")) : React.createElement(GoldWrapper, null, React.createElement("p", null, "Final Gold:"), React.createElement("p", null, "$", characterAvailableGold - sum)), React.createElement(ButtonWrapper, null, React.createElement(Button, {
29481
29476
  buttonType: ButtonTypes.RPGUIButton,
29482
- disabled: sum > characterAvailableGold
29477
+ disabled: sum > characterAvailableGold,
29478
+ onClick: function onClick() {
29479
+ return onConfirm();
29480
+ }
29483
29481
  }, "Confirm"), React.createElement(Button, {
29484
- buttonType: ButtonTypes.RPGUIButton
29482
+ buttonType: ButtonTypes.RPGUIButton,
29483
+ onClick: function onClick() {
29484
+ return onClose();
29485
+ }
29485
29486
  }, "Cancel"))));
29486
29487
  };
29487
29488
  var Title$3 = /*#__PURE__*/styled.h1.withConfig({
@@ -29507,7 +29508,7 @@ var GoldWrapper = /*#__PURE__*/styled.div.withConfig({
29507
29508
  var AlertWrapper = /*#__PURE__*/styled.div.withConfig({
29508
29509
  displayName: "TradingMenu__AlertWrapper",
29509
29510
  componentId: "sc-1wjsz1l-5"
29510
- })(["display:flex;width:100%;justify-content:center;height:20px;p{color:red !important;}"]);
29511
+ })(["margin-top:1rem;display:flex;width:100%;justify-content:center;height:20px;p{color:red !important;}"]);
29511
29512
  var ButtonWrapper = /*#__PURE__*/styled.div.withConfig({
29512
29513
  displayName: "TradingMenu__ButtonWrapper",
29513
29514
  componentId: "sc-1wjsz1l-6"