diff options
author | Sebastian <sebasjm@gmail.com> | 2023-06-27 08:20:49 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-06-27 08:21:03 -0300 |
commit | 97a9e92d8b104a94c376ae4fad8c5c811f5ef7e1 (patch) | |
tree | dee1f4e8861298d5bdf3987fcd24824bd7a6d3cf /packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx | |
parent | 18a3d764deb534dfa0f46981539ec4119dcc6c0f (diff) | |
download | wallet-core-97a9e92d8b104a94c376ae4fad8c5c811f5ef7e1.tar.xz |
set amount for manual withdraw when the qr does not have it
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx b/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx index 57d6238b2..8a01edaaf 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx +++ b/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx @@ -32,6 +32,8 @@ import { WithdrawDetails, } from "../../wallet/Transaction.js"; import { State } from "./index.js"; +import { Grid } from "../../mui/Grid.js"; +import { AmountField } from "../../components/AmountField.js"; export function SuccessView(state: State.Success): VNode { const { i18n } = useTranslationContext(); @@ -143,11 +145,45 @@ function WithdrawWithMobile({ ); } -export function SelectAmountView({ currency }: State.SelectAmount): VNode { +export function SelectAmountView({ + currency, + amount, + exchangeBaseUrl, + confirm, +}: State.SelectAmount): VNode { const { i18n } = useTranslationContext(); return ( <Fragment> - <p>select the amount for ${currency}</p> + <section style={{ textAlign: "left" }}> + <Part + title={ + <div + style={{ + display: "flex", + alignItems: "center", + }} + > + <i18n.Translate>Exchange</i18n.Translate> + </div> + } + text={<ExchangeDetails exchange={exchangeBaseUrl} />} + kind="neutral" + big + /> + <Grid container columns={2} justifyContent="space-between"> + <AmountField label={i18n.str`Amount`} required handler={amount} /> + </Grid> + </section> + <section> + <Button + variant="contained" + color="info" + disabled={!confirm.onClick} + onClick={confirm.onClick} + > + <i18n.Translate>See details</i18n.Translate> + </Button> + </section> </Fragment> ); } |