refactor from PR request

This commit is contained in:
Gala
2022-12-19 15:23:39 +01:00
parent e6ecf71cc3
commit ccbf06f179
2 changed files with 12 additions and 10 deletions
@@ -155,7 +155,11 @@ export const BondedMixnode = ({
{name}
</Typography>
)}
<IdentityKey identityKey={identityKey} tooltipTitle={host} />
<Tooltip title={host} placement="top" arrow>
<Box width="fit-content">
<IdentityKey identityKey={identityKey} />
</Box>
</Tooltip>
</Stack>
}
Action={
+7 -9
View File
@@ -3,13 +3,11 @@ import { Stack, Typography, Tooltip } from '@mui/material';
import { CopyToClipboard } from '@nymproject/react/clipboard/CopyToClipboard';
import { splice } from 'src/utils';
export const IdentityKey = ({ identityKey, tooltipTitle }: { identityKey: string; tooltipTitle?: string }) => (
<Tooltip title={tooltipTitle || ''} placement="top" arrow>
<Stack direction="row" width="fit-content">
<Typography variant="body2" component="span" fontWeight={400} sx={{ mr: 1, color: 'text.primary' }}>
{splice(6, identityKey)}
</Typography>
<CopyToClipboard value={identityKey} sx={{ fontSize: 18 }} />
</Stack>
</Tooltip>
export const IdentityKey = ({ identityKey }: { identityKey: string }) => (
<Stack direction="row" width="fit-content">
<Typography variant="body2" component="span" fontWeight={400} sx={{ mr: 1, color: 'text.primary' }}>
{splice(6, identityKey)}
</Typography>
<CopyToClipboard value={identityKey} sx={{ fontSize: 18 }} />
</Stack>
);