@rpg-engine/long-bow 0.2.37 → 0.2.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.2.37",
3
+ "version": "0.2.38",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -8,6 +8,7 @@ import { TradingItemRow } from './TradingItemRow';
8
8
  export interface ITrandingMenu {
9
9
  traderItems: ITradeResponseItem[];
10
10
  onClose: () => void;
11
+ onConfirm: () => void;
11
12
  type: TradeTransactionType;
12
13
  atlasJSON: any;
13
14
  atlasIMG: any;
@@ -23,6 +24,7 @@ export const TradingMenu: React.FC<ITrandingMenu> = ({
23
24
  atlasIMG,
24
25
  characterAvailableGold,
25
26
  onChangeTraderItems,
27
+ onConfirm,
26
28
  }) => {
27
29
  const [sum, setSum] = useState(0);
28
30
  let newSumArray = 0;
@@ -96,10 +98,16 @@ export const TradingMenu: React.FC<ITrandingMenu> = ({
96
98
  <Button
97
99
  buttonType={ButtonTypes.RPGUIButton}
98
100
  disabled={sum > characterAvailableGold}
101
+ onClick={() => onConfirm()}
99
102
  >
100
103
  Confirm
101
104
  </Button>
102
- <Button buttonType={ButtonTypes.RPGUIButton}>Cancel</Button>
105
+ <Button
106
+ buttonType={ButtonTypes.RPGUIButton}
107
+ onClick={() => onClose()}
108
+ >
109
+ Cancel
110
+ </Button>
103
111
  </ButtonWrapper>
104
112
  </>
105
113
  </DraggableContainer>