fix: change name of address and port inputs component

This commit is contained in:
RadoslavDimchev 2024-01-05 10:39:11 +02:00
parent 1a2c443c8a
commit 32c939a308
3 changed files with 12 additions and 12 deletions

View File

@ -4,7 +4,7 @@ import { Button, Input, Text } from '@status-im/components'
import { SettingsIcon, ClearIcon } from '@status-im/icons'
import { useSelector } from 'react-redux'
import AddressPortInputs from './AddressAndPortInputs'
import InputsRow from './InputsRow'
import { RootState } from '../../../redux/store'
const ConnectViaIP = () => {
@ -47,7 +47,7 @@ const ConnectViaIP = () => {
</XStack>
{isAdvanced ? (
<YStack space={'$3'}>
<AddressPortInputs
<InputsRow
addressType={'Validator Client'}
portType={'VC'}
address={vcAddress}
@ -56,7 +56,7 @@ const ConnectViaIP = () => {
isSwitchOn={isVcSwitchOn}
isChecked={isVcChecked}
/>
<AddressPortInputs
<InputsRow
addressType={'Beacon'}
portType={'Beacon'}
address={beaconAddress}
@ -67,7 +67,7 @@ const ConnectViaIP = () => {
/>
</YStack>
) : (
<AddressPortInputs addressType={'Node'} address={nodeAddress} />
<InputsRow addressType={'Node'} address={nodeAddress} />
)}
<Separator borderColor={'#e3e3e3'} />
<YStack space={'$2'}>

View File

@ -1,17 +1,17 @@
import type { Meta, StoryObj } from '@storybook/react'
import { withRouter } from 'storybook-addon-react-router-v6'
import AddressAndPortInputs from './AddressAndPortInputs'
import InputsRow from './InputsRow'
const meta = {
title: 'Pair Device/AddressAndPortInputs',
component: AddressAndPortInputs,
title: 'Pair Device/InputsRow',
component: InputsRow,
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
decorators: [withRouter],
} satisfies Meta<typeof AddressAndPortInputs>
} satisfies Meta<typeof InputsRow>
export default meta
type Story = StoryObj<typeof meta>

View File

@ -4,7 +4,7 @@ import { Stack, Switch, XStack, YStack } from 'tamagui'
import { RootState } from '../../../redux/store'
type AddressAndPortInputsProps = {
type InputsRowProps = {
addressType: string
portType?: string
isAdvanced?: boolean
@ -14,7 +14,7 @@ type AddressAndPortInputsProps = {
isChecked?: boolean
}
const AddressAndPortInputs = ({
const InputsRow = ({
isAdvanced,
addressType,
portType,
@ -22,7 +22,7 @@ const AddressAndPortInputs = ({
port,
isSwitchOn,
isChecked,
}: AddressAndPortInputsProps) => {
}: InputsRowProps) => {
const { beaconPort, vcPort, isNodeChecked, isNodeSwitchOn } = useSelector(
(state: RootState) => state.pairDevice,
)
@ -127,4 +127,4 @@ const AddressAndPortInputs = ({
)
}
export default AddressAndPortInputs
export default InputsRow