mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-05 14:00:09 +00:00
Add 'any' option to payment methods filter
This commit is contained in:
parent
a8c2af5824
commit
3e2b48862f
@ -17,6 +17,8 @@ import { paymentMethods, swapDestinations } from '../payment-methods/Methods';
|
|||||||
import FlagWithProps from '../FlagWithProps';
|
import FlagWithProps from '../FlagWithProps';
|
||||||
import PaymentIcon from '../payment-methods/Icons';
|
import PaymentIcon from '../payment-methods/Icons';
|
||||||
|
|
||||||
|
import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank';
|
||||||
|
|
||||||
interface BookControlProps {
|
interface BookControlProps {
|
||||||
width: number;
|
width: number;
|
||||||
type: number;
|
type: number;
|
||||||
@ -191,17 +193,30 @@ const BookControl = ({
|
|||||||
size='small'
|
size='small'
|
||||||
label={t('Select Payment Method')}
|
label={t('Select Payment Method')}
|
||||||
required={true}
|
required={true}
|
||||||
renderValue={(value) => (
|
renderValue={(value) =>
|
||||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
value == 'ANY' ? (
|
||||||
<PaymentIcon width={22} height={22} icon={value.icon} />
|
<CheckBoxOutlineBlankIcon style={{ position: 'relative', top: '0.1em' }} />
|
||||||
</div>
|
) : (
|
||||||
)}
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||||
|
<PaymentIcon width={22} height={22} icon={value.icon} />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
inputProps={{
|
inputProps={{
|
||||||
style: { textAlign: 'center' },
|
style: { textAlign: 'center' },
|
||||||
}}
|
}}
|
||||||
value={paymentMethod[0] ? paymentMethod[0] : ''}
|
value={paymentMethod[0] ? paymentMethod[0] : 'ANY'}
|
||||||
onChange={(e) => setPaymentMethods([e.target.value])}
|
onChange={(e) => setPaymentMethods([e.target.value])}
|
||||||
>
|
>
|
||||||
|
<MenuItem value={'ANY'}>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', flexWrap: 'wrap' }}>
|
||||||
|
<CheckBoxOutlineBlankIcon />
|
||||||
|
<div style={{ width: '0.3em' }} />
|
||||||
|
<Typography sx={{ width: '2em' }} align='right' color='text.secondary'>
|
||||||
|
{' ' + t('ANY')}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</MenuItem>
|
||||||
{currency === 1000
|
{currency === 1000
|
||||||
? swapDestinations.map((method, index) => (
|
? swapDestinations.map((method, index) => (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
|
Loading…
Reference in New Issue
Block a user