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} />}
|
||||
value={validatorCount.toString()}
|
||||
onChange={changeValidatorCountHandler}
|
||||
style={{ fontWeight: 'bold' }}
|
||||
/>
|
||||
</Stack>
|
||||
<YStack space={'$2'}>
|
||||
|
|
|
@ -1,12 +1,23 @@
|
|||
import { Stack, YStack } from 'tamagui'
|
||||
import { InformationBox, Input as StatusInput, Text } from '@status-im/components'
|
||||
import { ClearIcon, CloseCircleIcon } from '@status-im/icons'
|
||||
import { useState } from 'react'
|
||||
|
||||
type WithdrawalAddressProps = {
|
||||
title: string
|
||||
}
|
||||
|
||||
const WithdrawalAddress = ({ title }: WithdrawalAddressProps) => {
|
||||
const [withdrawalAddress, setWithdrawalAddress] = useState('')
|
||||
|
||||
const changeWithdrawalAddressHandler = (e: any) => {
|
||||
setWithdrawalAddress(e.target.value)
|
||||
}
|
||||
|
||||
const removeWithdrawalAddressHandler = () => {
|
||||
setWithdrawalAddress('')
|
||||
}
|
||||
|
||||
return (
|
||||
<YStack space={'$4'}>
|
||||
<Text size={27} weight={'semibold'}>
|
||||
|
@ -20,7 +31,15 @@ const WithdrawalAddress = ({ title }: WithdrawalAddressProps) => {
|
|||
<StatusInput
|
||||
placeholder={'******************'}
|
||||
width={'100%'}
|
||||
icon={<ClearIcon size={16} />}
|
||||
icon={
|
||||
<ClearIcon
|
||||
size={16}
|
||||
style={{ cursor: 'pointer' }}
|
||||
onClick={removeWithdrawalAddressHandler}
|
||||
/>
|
||||
}
|
||||
value={withdrawalAddress}
|
||||
onChange={changeWithdrawalAddressHandler}
|
||||
/>
|
||||
</Stack>
|
||||
<InformationBox
|
||||
|
|
Loading…
Reference in New Issue