Adjust target AddressMini padding (#2645)
This commit is contained in:
parent
6b2a880196
commit
dde3920ae2
@ -17,7 +17,7 @@ interface Props {
|
||||
targets: string[];
|
||||
}
|
||||
|
||||
function Nominate ({ ownNominators, targets }: Props): React.ReactElement<Props> {
|
||||
function Nominate ({ className, ownNominators, targets }: Props): React.ReactElement<Props> {
|
||||
const { t } = useTranslation();
|
||||
const [ids, setIds] = useState<{ controllerId?: string | null; stashId: string } | null>(null);
|
||||
const [filter, setFilter] = useState<string[]>([]);
|
||||
@ -51,19 +51,11 @@ function Nominate ({ ownNominators, targets }: Props): React.ReactElement<Props>
|
||||
onClick={toggleOpen}
|
||||
/>
|
||||
{isOpen && (
|
||||
<Modal header={t('Nominate validators')}>
|
||||
<Modal
|
||||
className={className}
|
||||
header={t('Nominate validators')}
|
||||
>
|
||||
<Modal.Content>
|
||||
<Static
|
||||
label={t('selected validators')}
|
||||
value={
|
||||
targets.map((validatorId) => (
|
||||
<AddressMini
|
||||
key={validatorId}
|
||||
value={validatorId}
|
||||
/>
|
||||
))
|
||||
}
|
||||
/>
|
||||
<InputAddress
|
||||
filter={filter}
|
||||
help={t('Your stash account. The transaction will be sent from the associated controller.')}
|
||||
@ -77,6 +69,17 @@ function Nominate ({ ownNominators, targets }: Props): React.ReactElement<Props>
|
||||
onChange={_onChangeStash}
|
||||
value={ids?.controllerId}
|
||||
/>
|
||||
<Static
|
||||
label={t('selected validators')}
|
||||
value={
|
||||
targets.map((validatorId) => (
|
||||
<AddressMini
|
||||
key={validatorId}
|
||||
value={validatorId}
|
||||
/>
|
||||
))
|
||||
}
|
||||
/>
|
||||
</Modal.Content>
|
||||
<Modal.Actions onCancel={toggleOpen}>
|
||||
<TxButton
|
||||
|
||||
@ -100,15 +100,17 @@ function Targets ({ className, ownStashes, targets: { calcWith, lastReward, nomi
|
||||
], [_sort, labels, sortBy, sortFromMax, t]);
|
||||
|
||||
const filter = useMemo(() => (
|
||||
<InputBalance
|
||||
className='balanceInput'
|
||||
help={t('The amount that will be used on a per-validator basis to calculate profits for that validator.')}
|
||||
isFull
|
||||
label={t('amount to use for estimation')}
|
||||
onChange={setCalcWith}
|
||||
value={calcWith}
|
||||
/>
|
||||
), [calcWith, setCalcWith, t]);
|
||||
sorted && (
|
||||
<InputBalance
|
||||
className='balanceInput'
|
||||
help={t('The amount that will be used on a per-validator basis to calculate profits for that validator.')}
|
||||
isFull
|
||||
label={t('amount to use for estimation')}
|
||||
onChange={setCalcWith}
|
||||
value={calcWith}
|
||||
/>
|
||||
)
|
||||
), [calcWith, setCalcWith, sorted, t]);
|
||||
|
||||
return (
|
||||
<div className={className}>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user