Align staking status icons (#3027)

* Align staking status icons

* No content
This commit is contained in:
Jaco Greeff 2020-06-22 14:00:34 +02:00 committed by GitHub
parent 0a2e04abc7
commit 7289f02c81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 9 deletions

View File

@ -17,13 +17,21 @@ interface Props {
function Status ({ isElected, numNominators, onlineCount, onlineMessage }: Props): React.ReactElement<Props> {
return (
<td className='badge together'>
{isElected && (
<Badge
color='blue'
info={<Icon name='chevron right' />}
isInline
/>
)}
{isElected
? (
<Badge
color='blue'
info={<Icon name='chevron right' />}
isInline
/>
)
: (
<Badge
color='transparent'
isInline
/>
)
}
{(!!onlineCount || onlineMessage) && (
<Badge
color='green'

View File

@ -9,9 +9,9 @@ import Tooltip from './Tooltip';
interface Props {
className?: string;
color: 'counter' | 'green' | 'blue' | 'gray' | 'purple' | 'red';
color: 'counter' | 'green' | 'blue' | 'gray' | 'purple' | 'red' | 'transparent';
hover?: React.ReactNode;
info: React.ReactNode;
info?: React.ReactNode;
isInline?: boolean;
isSmall?: boolean;
isTooltip?: boolean;
@ -121,6 +121,11 @@ export default React.memo(styled(Badge)`
background: indigo;
}
&.transparent {
background: transparent;
box-shadow: none;
}
& > * {
line-height: 22px;
overflow: hidden;