@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.
- package/dist/components/TradingMenu/TradingMenu.d.ts +1 -1
- package/dist/long-bow.cjs.development.js +10 -9
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +10 -9
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/TradingMenu/TradingMenu.tsx +11 -9
|
@@ -3,10 +3,10 @@ import React from 'react';
|
|
|
3
3
|
export interface ITrandingMenu {
|
|
4
4
|
traderItems: ITradeResponseItem[];
|
|
5
5
|
onClose: () => void;
|
|
6
|
+
onConfirm: () => void;
|
|
6
7
|
type: TradeTransactionType;
|
|
7
8
|
atlasJSON: any;
|
|
8
9
|
atlasIMG: any;
|
|
9
10
|
characterAvailableGold: number;
|
|
10
|
-
onChangeTraderItems: (traderItems: ITradeResponseItem[]) => void;
|
|
11
11
|
}
|
|
12
12
|
export declare const TradingMenu: React.FC<ITrandingMenu>;
|
|
@@ -29436,7 +29436,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
29436
29436
|
atlasJSON = _ref.atlasJSON,
|
|
29437
29437
|
atlasIMG = _ref.atlasIMG,
|
|
29438
29438
|
characterAvailableGold = _ref.characterAvailableGold,
|
|
29439
|
-
|
|
29439
|
+
onConfirm = _ref.onConfirm;
|
|
29440
29440
|
var _useState = React.useState(0),
|
|
29441
29441
|
sum = _useState[0],
|
|
29442
29442
|
setSum = _useState[1];
|
|
@@ -29451,11 +29451,6 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
29451
29451
|
setSum(newSumArray);
|
|
29452
29452
|
});
|
|
29453
29453
|
};
|
|
29454
|
-
React.useEffect(function () {
|
|
29455
|
-
if (onChangeTraderItems) {
|
|
29456
|
-
onChangeTraderItems(traderItems);
|
|
29457
|
-
}
|
|
29458
|
-
}, [traderItems]);
|
|
29459
29454
|
var Capitalize = function Capitalize(word) {
|
|
29460
29455
|
return word[0].toUpperCase() + word.substring(1);
|
|
29461
29456
|
};
|
|
@@ -29481,9 +29476,15 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
29481
29476
|
}));
|
|
29482
29477
|
})), React__default.createElement(GoldWrapper, null, React__default.createElement("p", null, "Available Gold:"), React__default.createElement("p", null, "$", characterAvailableGold)), React__default.createElement(TotalWrapper, null, React__default.createElement("p", null, "Total:"), React__default.createElement("p", null, "$", sum)), sum > characterAvailableGold ? React__default.createElement(AlertWrapper, null, React__default.createElement("p", null, " Sorry, not enough money.")) : React__default.createElement(GoldWrapper, null, React__default.createElement("p", null, "Final Gold:"), React__default.createElement("p", null, "$", characterAvailableGold - sum)), React__default.createElement(ButtonWrapper, null, React__default.createElement(Button, {
|
|
29483
29478
|
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
29484
|
-
disabled: sum > characterAvailableGold
|
|
29479
|
+
disabled: sum > characterAvailableGold,
|
|
29480
|
+
onClick: function onClick() {
|
|
29481
|
+
return onConfirm();
|
|
29482
|
+
}
|
|
29485
29483
|
}, "Confirm"), React__default.createElement(Button, {
|
|
29486
|
-
buttonType: exports.ButtonTypes.RPGUIButton
|
|
29484
|
+
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
29485
|
+
onClick: function onClick() {
|
|
29486
|
+
return onClose();
|
|
29487
|
+
}
|
|
29487
29488
|
}, "Cancel"))));
|
|
29488
29489
|
};
|
|
29489
29490
|
var Title$3 = /*#__PURE__*/styled.h1.withConfig({
|
|
@@ -29509,7 +29510,7 @@ var GoldWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
29509
29510
|
var AlertWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
29510
29511
|
displayName: "TradingMenu__AlertWrapper",
|
|
29511
29512
|
componentId: "sc-1wjsz1l-5"
|
|
29512
|
-
})(["display:flex;width:100%;justify-content:center;height:20px;p{color:red !important;}"]);
|
|
29513
|
+
})(["margin-top:1rem;display:flex;width:100%;justify-content:center;height:20px;p{color:red !important;}"]);
|
|
29513
29514
|
var ButtonWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
29514
29515
|
displayName: "TradingMenu__ButtonWrapper",
|
|
29515
29516
|
componentId: "sc-1wjsz1l-6"
|