Remove staking badge tooltips (#2603)

This commit is contained in:
Jaco Greeff 2020-04-22 22:07:24 +02:00 committed by GitHub
parent e507ffe0e1
commit d57908ead8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 16 deletions

View File

@ -4,9 +4,6 @@
import React from 'react';
import { Badge, Icon } from '@polkadot/react-components';
import { formatNumber } from '@polkadot/util';
import { useTranslation } from '../../translate';
interface Props {
isElected: boolean;
@ -15,30 +12,19 @@ interface Props {
}
function Status ({ isElected, onlineCount, onlineMessage }: Props): React.ReactElement<Props> {
const { t } = useTranslation();
return (
<td className='together'>
{isElected && (
<Badge
hover={t('Selected for the next session')}
info={<Icon name='chevron right' />}
isInline
isTooltip
type='next'
/>
)}
{(!!onlineCount || onlineMessage) && (
<Badge
hover={t('Active with {{blocks}} blocks authored{{hasMessage}} heartbeat message', {
replace: {
blocks: formatNumber(onlineCount || 0),
hasMessage: onlineMessage ? ' and a' : ', no'
}
})}
info={<Icon name='check' />}
info={onlineCount || <Icon name='envelope' />}
isInline
isTooltip
type='online'
/>
)}

View File

@ -52,7 +52,6 @@ export default React.memo(styled(Badge)`
border-radius: 16px;
box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
color: #eee;
cursor: help;
font-size: 12px;
height: 22px;
padding: 0 4px;
@ -60,6 +59,10 @@ export default React.memo(styled(Badge)`
width: 22px;
min-width: 22px;
&.isTooltip {
cursor: help;
}
i.icon {
cursor: inherit !important;
margin: 0;