Center InlineSpinner

This commit is contained in:
james-prado 2018-02-07 17:52:39 -05:00
parent 21082e6d90
commit 7ea14e1d9d
No known key found for this signature in database
GPG Key ID: 313ACB2286229FD0
5 changed files with 24 additions and 3 deletions

View File

@ -0,0 +1,11 @@
@import 'common/sass/variables';
.gaslimit {
&-label-wrapper {
align-items: center;
margin-bottom: $space-xs;
> label {
margin-bottom: 0;
}
}
}

View File

@ -3,6 +3,7 @@ import { GasLimitFieldFactory } from './GasLimitFieldFactory';
import translate from 'translations';
import { gasLimitValidator } from 'libs/validators';
import { InlineSpinner } from 'components/ui/InlineSpinner';
import './GasLimitField.scss';
interface Props {
customLabel?: string;
@ -13,7 +14,7 @@ export const GasLimitField: React.SFC<Props> = ({ customLabel, disabled }) => (
<GasLimitFieldFactory
withProps={({ gasLimit: { raw }, onChange, readOnly, gasEstimationPending }) => (
<React.Fragment>
<div className="flex-wrapper">
<div className="gaslimit-label-wrapper flex-wrapper">
{customLabel ? <label>{customLabel} </label> : <label>{translate('TRANS_gas')} </label>}
<div className="flex-spacer" />
<InlineSpinner active={gasEstimationPending} text="Calculating" />

View File

@ -1,4 +1,13 @@
@import 'common/sass/variables';
.nonce {
&-label-wrapper {
align-items: center;
margin-bottom: $space-xs;
> label {
margin-bottom: 0;
}
}
&-input-wrapper {
position: relative;
}

View File

@ -31,7 +31,7 @@ class NonceField extends React.Component<Props> {
withProps={({ nonce: { raw, value }, onChange, readOnly, shouldDisplay }) => {
return alwaysDisplay || shouldDisplay ? (
<React.Fragment>
<div className="flex-wrapper">
<div className="nonce-label-wrapper flex-wrapper">
<label className="nonce-label">Nonce</label>
<Help
size={'x1'}

View File

@ -12,7 +12,7 @@
.Calculating-limit {
color: rgba(51, 51, 51, 0.7);
display: flex;
align-items: baseline;
align-items: center;
font-weight: 400;
opacity: 0;
pointer-events: none;