feat: add state to withdrawal address
This commit is contained in:
parent
41221a7a84
commit
e77a129f71
|
@ -34,6 +34,7 @@ const SetupRow = ({ title }: SetupRowProps) => {
|
||||||
icon={<AddIcon size={16} style={{ cursor: 'pointer' }} onClick={addValidatorHandler} />}
|
icon={<AddIcon size={16} style={{ cursor: 'pointer' }} onClick={addValidatorHandler} />}
|
||||||
value={validatorCount.toString()}
|
value={validatorCount.toString()}
|
||||||
onChange={changeValidatorCountHandler}
|
onChange={changeValidatorCountHandler}
|
||||||
|
style={{ fontWeight: 'bold' }}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<YStack space={'$2'}>
|
<YStack space={'$2'}>
|
||||||
|
|
|
@ -1,12 +1,23 @@
|
||||||
import { Stack, YStack } from 'tamagui'
|
import { Stack, YStack } from 'tamagui'
|
||||||
import { InformationBox, Input as StatusInput, Text } from '@status-im/components'
|
import { InformationBox, Input as StatusInput, Text } from '@status-im/components'
|
||||||
import { ClearIcon, CloseCircleIcon } from '@status-im/icons'
|
import { ClearIcon, CloseCircleIcon } from '@status-im/icons'
|
||||||
|
import { useState } from 'react'
|
||||||
|
|
||||||
type WithdrawalAddressProps = {
|
type WithdrawalAddressProps = {
|
||||||
title: string
|
title: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const WithdrawalAddress = ({ title }: WithdrawalAddressProps) => {
|
const WithdrawalAddress = ({ title }: WithdrawalAddressProps) => {
|
||||||
|
const [withdrawalAddress, setWithdrawalAddress] = useState('')
|
||||||
|
|
||||||
|
const changeWithdrawalAddressHandler = (e: any) => {
|
||||||
|
setWithdrawalAddress(e.target.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
const removeWithdrawalAddressHandler = () => {
|
||||||
|
setWithdrawalAddress('')
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<YStack space={'$4'}>
|
<YStack space={'$4'}>
|
||||||
<Text size={27} weight={'semibold'}>
|
<Text size={27} weight={'semibold'}>
|
||||||
|
@ -20,7 +31,15 @@ const WithdrawalAddress = ({ title }: WithdrawalAddressProps) => {
|
||||||
<StatusInput
|
<StatusInput
|
||||||
placeholder={'******************'}
|
placeholder={'******************'}
|
||||||
width={'100%'}
|
width={'100%'}
|
||||||
icon={<ClearIcon size={16} />}
|
icon={
|
||||||
|
<ClearIcon
|
||||||
|
size={16}
|
||||||
|
style={{ cursor: 'pointer' }}
|
||||||
|
onClick={removeWithdrawalAddressHandler}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
value={withdrawalAddress}
|
||||||
|
onChange={changeWithdrawalAddressHandler}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<InformationBox
|
<InformationBox
|
||||||
|
|
Loading…
Reference in New Issue