diff options
author | Sebastian <sebasjm@gmail.com> | 2021-12-23 15:17:36 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-12-23 15:17:36 -0300 |
commit | 2e71117f59e0ae6106930e705ae6a54a9839281b (patch) | |
tree | a39856486a2801f56c65de245c871ce596f8ab16 /packages/taler-wallet-webextension/src/components | |
parent | b8200de6f6c5ab9be3ff9f556c8acda013e574c3 (diff) | |
download | wallet-core-2e71117f59e0ae6106930e705ae6a54a9839281b.tar.xz |
deposit from wallet webex: wip
Diffstat (limited to 'packages/taler-wallet-webextension/src/components')
-rw-r--r-- | packages/taler-wallet-webextension/src/components/BalanceTable.tsx | 18 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/components/styled/index.tsx | 4 |
2 files changed, 20 insertions, 2 deletions
diff --git a/packages/taler-wallet-webextension/src/components/BalanceTable.tsx b/packages/taler-wallet-webextension/src/components/BalanceTable.tsx index e1c19cc23..cf396e129 100644 --- a/packages/taler-wallet-webextension/src/components/BalanceTable.tsx +++ b/packages/taler-wallet-webextension/src/components/BalanceTable.tsx @@ -16,9 +16,18 @@ import { amountFractionalBase, Amounts, Balance } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; -import { TableWithRoundRows as TableWithRoundedRows } from "./styled/index"; +import { + ButtonPrimary, + TableWithRoundRows as TableWithRoundedRows, +} from "./styled/index"; -export function BalanceTable({ balances }: { balances: Balance[] }): VNode { +export function BalanceTable({ + balances, + goToWalletDeposit, +}: { + balances: Balance[]; + goToWalletDeposit: (currency: string) => void; +}): VNode { const currencyFormatter = new Intl.NumberFormat("en-US"); return ( <TableWithRoundedRows> @@ -40,6 +49,11 @@ export function BalanceTable({ balances }: { balances: Balance[] }): VNode { > {v} </td> + <td> + <ButtonPrimary onClick={() => goToWalletDeposit(av.currency)}> + Deposit + </ButtonPrimary> + </td> </tr> ); })} diff --git a/packages/taler-wallet-webextension/src/components/styled/index.tsx b/packages/taler-wallet-webextension/src/components/styled/index.tsx index a5c9f2837..216a1fabc 100644 --- a/packages/taler-wallet-webextension/src/components/styled/index.tsx +++ b/packages/taler-wallet-webextension/src/components/styled/index.tsx @@ -716,6 +716,10 @@ export const InputWithLabel = styled.div<{ invalid?: boolean }>` } `; +export const ErrorText = styled.div` + color: red; +`; + export const ErrorBox = styled.div` border: 2px solid #f5c6cb; border-radius: 0.25em; |