@rpg-engine/long-bow 0.8.130 → 0.8.131
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/Store/Store.d.ts +2 -0
- package/dist/long-bow.cjs.development.js +10 -4
- 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 +11 -5
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Store/Store.tsx +19 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IItemPack, IPurchase, IProductBlueprint, ItemRarities, ItemSubType, ItemType, UserAccountTypes, PaymentCurrency, PurchaseType } from '@rpg-engine/shared';
|
|
2
2
|
import React, { ReactNode, useMemo, useState } from 'react';
|
|
3
|
-
import { FaHistory, FaShoppingCart } from 'react-icons/fa';
|
|
3
|
+
import { FaHistory, FaShoppingCart, FaWallet } from 'react-icons/fa';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { uiColors } from '../../constants/uiColors';
|
|
6
6
|
import { DraggableContainer } from '../DraggableContainer';
|
|
@@ -24,7 +24,9 @@ export interface IStoreProps {
|
|
|
24
24
|
atlasJSON: any;
|
|
25
25
|
atlasIMG: string;
|
|
26
26
|
onPurchase: (purchase: Partial<IPurchase>) => Promise<boolean>;
|
|
27
|
-
onShowHistory?: () => void;
|
|
27
|
+
onShowHistory?: () => void;
|
|
28
|
+
onShowWallet?: () => void;
|
|
29
|
+
walletLabel?: string;
|
|
28
30
|
userAccountType: UserAccountTypes;
|
|
29
31
|
loading?: boolean;
|
|
30
32
|
error?: string;
|
|
@@ -43,7 +45,9 @@ export const Store: React.FC<IStoreProps> = ({
|
|
|
43
45
|
atlasJSON,
|
|
44
46
|
atlasIMG,
|
|
45
47
|
onPurchase,
|
|
46
|
-
onShowHistory,
|
|
48
|
+
onShowHistory,
|
|
49
|
+
onShowWallet,
|
|
50
|
+
walletLabel,
|
|
47
51
|
userAccountType,
|
|
48
52
|
loading = false,
|
|
49
53
|
error,
|
|
@@ -242,7 +246,7 @@ export const Store: React.FC<IStoreProps> = ({
|
|
|
242
246
|
) : (
|
|
243
247
|
<Container>
|
|
244
248
|
<TopBar>
|
|
245
|
-
<
|
|
249
|
+
<LeftButtons>
|
|
246
250
|
{onShowHistory && (
|
|
247
251
|
<CTAButton
|
|
248
252
|
icon={<FaHistory />}
|
|
@@ -250,7 +254,14 @@ export const Store: React.FC<IStoreProps> = ({
|
|
|
250
254
|
onClick={onShowHistory}
|
|
251
255
|
/>
|
|
252
256
|
)}
|
|
253
|
-
|
|
257
|
+
{onShowWallet && (
|
|
258
|
+
<CTAButton
|
|
259
|
+
icon={<FaWallet />}
|
|
260
|
+
label={walletLabel ?? 'DC Wallet'}
|
|
261
|
+
onClick={onShowWallet}
|
|
262
|
+
/>
|
|
263
|
+
)}
|
|
264
|
+
</LeftButtons>
|
|
254
265
|
<CartButton>
|
|
255
266
|
<CTAButton
|
|
256
267
|
icon={<FaShoppingCart />}
|
|
@@ -316,7 +327,9 @@ const TopBar = styled.div`
|
|
|
316
327
|
margin-top: 0.5rem;
|
|
317
328
|
`;
|
|
318
329
|
|
|
319
|
-
const
|
|
330
|
+
const LeftButtons = styled.div`
|
|
331
|
+
display: flex;
|
|
332
|
+
gap: 0.5rem;
|
|
320
333
|
min-width: fit-content;
|
|
321
334
|
margin-right: auto;
|
|
322
335
|
`;
|