@rpg-engine/long-bow 0.8.178 → 0.8.179

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.8.178",
3
+ "version": "0.8.179",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -9,17 +9,21 @@ export interface IPaymentMethodModalProps {
9
9
  dcRequired?: number;
10
10
  onPayWithDC: () => void;
11
11
  onPayWithCard: () => void;
12
+ onPayWithPix: () => void;
12
13
  onClose: () => void;
14
+ showPix?: boolean;
13
15
  }
14
16
 
15
- type PaymentMethod = 'dc' | 'card';
17
+ type PaymentMethod = 'dc' | 'card' | 'pix';
16
18
 
17
19
  export const PaymentMethodModal: React.FC<IPaymentMethodModalProps> = ({
18
20
  dcBalance,
19
21
  dcRequired,
20
22
  onPayWithDC,
21
23
  onPayWithCard,
24
+ onPayWithPix,
22
25
  onClose,
26
+ showPix = false,
23
27
  }) => {
24
28
  const [selected, setSelected] = useState<PaymentMethod>('card');
25
29
 
@@ -41,10 +45,12 @@ export const PaymentMethodModal: React.FC<IPaymentMethodModalProps> = ({
41
45
  const handleConfirm = useCallback(() => {
42
46
  if (selected === 'dc' && !dcDisabled) {
43
47
  onPayWithDC();
48
+ } else if (selected === 'pix') {
49
+ onPayWithPix();
44
50
  } else {
45
51
  onPayWithCard();
46
52
  }
47
- }, [selected, dcDisabled, onPayWithDC, onPayWithCard]);
53
+ }, [selected, dcDisabled, onPayWithDC, onPayWithCard, onPayWithPix]);
48
54
 
49
55
  const dcSubText =
50
56
  dcRequired !== undefined
@@ -79,6 +85,19 @@ export const PaymentMethodModal: React.FC<IPaymentMethodModalProps> = ({
79
85
  </OptionText>
80
86
  </RadioOption>
81
87
 
88
+ {showPix && (
89
+ <RadioOption
90
+ $selected={selected === 'pix'}
91
+ onPointerDown={() => setSelected('pix')}
92
+ >
93
+ <RadioCircle $selected={selected === 'pix'} />
94
+ <OptionText>
95
+ <OptionLabel>Pix</OptionLabel>
96
+ <OptionSub>Instant payment via Pix</OptionSub>
97
+ </OptionText>
98
+ </RadioOption>
99
+ )}
100
+
82
101
  <RadioOption
83
102
  $selected={selected === 'dc'}
84
103
  $disabled={dcDisabled}