diff options
author | Sebastian <sebasjm@gmail.com> | 2021-10-11 15:59:55 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-10-11 15:59:55 -0300 |
commit | be8e3f4b1d090a536967f132a7fd4742bbcd5343 (patch) | |
tree | d184ba3cf40510009e4121c6daa5653e0be475b0 /packages/taler-wallet-webextension/src/components | |
parent | 78fb5f79a8690ee490c96b271dadd37f4c9442d6 (diff) | |
download | wallet-core-be8e3f4b1d090a536967f132a7fd4742bbcd5343.tar.xz |
fixing withdrawal process
Diffstat (limited to 'packages/taler-wallet-webextension/src/components')
-rw-r--r-- | packages/taler-wallet-webextension/src/components/SelectList.tsx | 8 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/components/styled/index.tsx | 23 |
2 files changed, 24 insertions, 7 deletions
diff --git a/packages/taler-wallet-webextension/src/components/SelectList.tsx b/packages/taler-wallet-webextension/src/components/SelectList.tsx index 7890c3fa4..536e5b89a 100644 --- a/packages/taler-wallet-webextension/src/components/SelectList.tsx +++ b/packages/taler-wallet-webextension/src/components/SelectList.tsx @@ -19,7 +19,7 @@ import { NiceSelect } from "./styled/index"; import { h } from "preact"; interface Props { - value: string; + value?: string; onChange: (s: string) => void; label: string; list: { @@ -41,9 +41,11 @@ export function SelectList({ name, value, list, canBeNull, onChange, label, desc console.log(e.currentTarget.value, value) onChange(e.currentTarget.value) }}> - <option selected> + {value !== undefined ? <option selected> {list[value]} - </option> + </option> : <option selected disabled> + Select one option + </option>} {Object.keys(list) .filter((l) => l !== value) .map(key => <option value={key} key={key}>{list[key]}</option>) diff --git a/packages/taler-wallet-webextension/src/components/styled/index.tsx b/packages/taler-wallet-webextension/src/components/styled/index.tsx index e77e7d542..7c3bb3943 100644 --- a/packages/taler-wallet-webextension/src/components/styled/index.tsx +++ b/packages/taler-wallet-webextension/src/components/styled/index.tsx @@ -129,6 +129,12 @@ export const WalletBox = styled.div<{ noPadding?: boolean }>` } } ` +export const Middle = styled.div` + justify-content: space-around; + display: flex; + flex-direction: column; + height: 100%; +` export const PopupBox = styled.div<{ noPadding?: boolean }>` height: 290px; @@ -138,11 +144,10 @@ export const PopupBox = styled.div<{ noPadding?: boolean }>` justify-content: space-between; & > section { - padding-left: ${({ noPadding }) => noPadding ? '0px' : '8px'}; - padding-right: ${({ noPadding }) => noPadding ? '0px' : '8px'}; + padding: ${({ noPadding }) => noPadding ? '0px' : '8px'}; // this margin will send the section up when used with a header margin-bottom: auto; - overflow: auto; + overflow-y: auto; table td { padding: 5px 10px; @@ -153,6 +158,16 @@ export const PopupBox = styled.div<{ noPadding?: boolean }>` } } + & > section[data-expanded] { + height: 100%; + } + + & > section[data-centered] { + justify-content: center; + display: flex; + /* flex-direction: column; */ + } + & > header { flex-direction: row; justify-content: space-between; @@ -596,7 +611,7 @@ export const NiceSelect = styled.div` position: relative; display: flex; - width: 10em; + /* width: 10em; */ overflow: hidden; border-radius: .25em; |