Fix status layout (#7432)

This commit is contained in:
Jaco Greeff 2018-01-03 10:49:52 +01:00 committed by GitHub
parent 6a01113610
commit 8405edab41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 7 deletions

View File

@ -33,7 +33,9 @@ import styles from './signerPending.css';
@observer @observer
class SignerPending extends Component { class SignerPending extends Component {
static propTypes = {}; static propTypes = {
className: PropTypes.string
};
static contextTypes = { static contextTypes = {
api: PropTypes.object.isRequired api: PropTypes.object.isRequired
@ -91,11 +93,13 @@ class SignerPending extends Component {
); );
render () { render () {
const { className } = this.props;
return ( return (
<Popup <Popup
wide='very' wide='very'
trigger={ trigger={
<div className={ [styles.signerPending].join(' ') }> <div className={ [styles.signerPending, className].join(' ') }>
<Icon <Icon
name={ this.store.pending.length > 0 ? 'bell' : 'bell outline' } name={ this.store.pending.length > 0 ? 'bell' : 'bell outline' }
/> />

View File

@ -52,16 +52,16 @@ $statusHeight: 2.75em;
} }
.plugins { .plugins {
align-items: center;
display: flex;
flex-grow: 1; flex-grow: 1;
text-align: right; justify-content: flex-end;
vertical-align: middle;
> div, > div,
> img, > img,
> span { > span {
display: inline-block !important; align-self: center;
margin: 0 0 0 1rem; margin: 0 0 0 1rem;
vertical-align: middle;
} }
.divider { .divider {
@ -70,9 +70,29 @@ $statusHeight: 2.75em;
opacity: 0.75; opacity: 0.75;
} }
.health,
.pending {
/* Same as default line-height, i.e. item same as text following */
height: 1.4285rem;
}
.health { .health {
> span { > span {
height: 100%;
/* re-instate the original margin, no negative offset */
margin-top: 0.2em;
width: auto; width: auto;
> span {
/* default vertical alignment */
vertical-align: baseline;
}
}
}
.pending {
> i {
height: 100%;
} }
} }
} }

View File

@ -69,7 +69,7 @@ function Status ({ className = '', upgradeStore }, { api }) {
className={ styles.health } className={ styles.health }
id='application.status.health' id='application.status.health'
/> />
<SignerPending /> <SignerPending className={ styles.pending } />
<div className={ styles.divider } /> <div className={ styles.divider } />
<BlockNumber <BlockNumber