Skip to content

Commit 427941b

Browse files
committed
feat(neuron-ui): append network ips to network names in networks setting
1 parent 099c2f5 commit 427941b

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

  • packages/neuron-ui/src/components/NetworkSetting

packages/neuron-ui/src/components/NetworkSetting/index.tsx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useCallback } from 'react'
22
import { RouteComponentProps } from 'react-router-dom'
33
import { useTranslation } from 'react-i18next'
4-
import { Stack, PrimaryButton, ChoiceGroup, IChoiceGroupOption } from 'office-ui-fabric-react'
4+
import { Stack, Text, PrimaryButton, ChoiceGroup, IChoiceGroupOption } from 'office-ui-fabric-react'
55

66
import { StateWithDispatch } from 'states/stateProvider/reducer'
77
import chainState from 'states/initStates/chain'
@@ -41,9 +41,19 @@ const NetworkSetting = ({
4141
checked: chain.networkID === network.id,
4242
onRenderLabel: ({ text }: IChoiceGroupOption) => {
4343
return (
44-
<span className="ms-ChoiceFieldLabel" onContextMenu={onContextMenu(network.id)}>
45-
{text}
46-
</span>
44+
<Stack
45+
horizontal
46+
tokens={{ childrenGap: 5 }}
47+
onContextMenu={onContextMenu(network.id)}
48+
title={`${text}: ${network.remote}`}
49+
>
50+
<Text as="span" className="ms-ChoiceFieldLabel">
51+
{text}
52+
</Text>
53+
<Text as="span" style={{ color: '#999' }}>
54+
{`(${network.remote})`}
55+
</Text>
56+
</Stack>
4757
)
4858
},
4959
})

0 commit comments

Comments
 (0)