feat: add state to withdrawal address

This commit is contained in:
RadoslavDimchev 2023-09-07 11:53:54 +03:00
parent 41221a7a84
commit e77a129f71
2 changed files with 21 additions and 1 deletions

View File

@ -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'}>

View File

@ -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