Skip to content

Commit

Permalink
feat(neuron-ui): append network ips to network names in networks setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Jul 30, 2019
1 parent 099c2f5 commit 427941b
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions packages/neuron-ui/src/components/NetworkSetting/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback } from 'react'
import { RouteComponentProps } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
import { Stack, PrimaryButton, ChoiceGroup, IChoiceGroupOption } from 'office-ui-fabric-react'
import { Stack, Text, PrimaryButton, ChoiceGroup, IChoiceGroupOption } from 'office-ui-fabric-react'

import { StateWithDispatch } from 'states/stateProvider/reducer'
import chainState from 'states/initStates/chain'
Expand Down Expand Up @@ -41,9 +41,19 @@ const NetworkSetting = ({
checked: chain.networkID === network.id,
onRenderLabel: ({ text }: IChoiceGroupOption) => {
return (
<span className="ms-ChoiceFieldLabel" onContextMenu={onContextMenu(network.id)}>
{text}
</span>
<Stack
horizontal
tokens={{ childrenGap: 5 }}
onContextMenu={onContextMenu(network.id)}
title={`${text}: ${network.remote}`}
>
<Text as="span" className="ms-ChoiceFieldLabel">
{text}
</Text>
<Text as="span" style={{ color: '#999' }}>
{`(${network.remote})`}
</Text>
</Stack>
)
},
})
Expand Down

0 comments on commit 427941b

Please sign in to comment.