feat: create deposit header component

This commit is contained in:
RadoslavDimchev 2023-09-20 21:52:46 +03:00
parent 9796807d63
commit 1191b800d1
2 changed files with 18 additions and 3 deletions

View File

@ -7,6 +7,7 @@ import ValidatorRequest from './ValidatorRequest'
import Validators from './Validators'
import ConnectWallet from './ConnectWallet'
import ConnectedWallet from './ConnectedWallet'
import DepositHeader from './DepositHeader'
const Deposit = () => {
const [isInfoBoxVisible, setIsInfoBoxVisible] = useState(true)
@ -14,6 +15,7 @@ const Deposit = () => {
const validatorRequests = [1, 2]
const isConnectedWallet = false
const isTransactionConfirmation = true
const addValidatorHandler = () => {
setValidatorCount((state: number) => state + 1)
@ -31,9 +33,7 @@ const Deposit = () => {
return (
<YStack space={'$3'} style={{ width: '100%', padding: '16px 32px', alignItems: 'start' }}>
<Text size={19} weight={'semibold'}>
Deposit Funds
</Text>
<DepositHeader isTransactionConfirmation={isTransactionConfirmation} />
<Validators
validatorCount={validatorCount}
addValidatorHandler={addValidatorHandler}

View File

@ -0,0 +1,15 @@
import { Text } from '@status-im/components'
type DepositHeaderProps = {
isTransactionConfirmation: boolean
}
const DepositHeader = ({ isTransactionConfirmation }: DepositHeaderProps) => {
return (
<Text size={19} weight={'semibold'}>
{isTransactionConfirmation ? 'Transaction Confirmation' : 'Deposit Funds'}
</Text>
)
}
export default DepositHeader