Fix layout issues flagged by @tmashuang

feature/default_network_editable
sdtsui 7 years ago
parent b6a7281737
commit 9d3b5348aa
  1. 148
      ui/app/components/shapeshift-form.js

@ -33,10 +33,10 @@ ShapeshiftForm.prototype.renderMain = function () {
return h('.flex-column', { return h('.flex-column', {
style: { style: {
// marginTop: '10px', position: 'relative',
padding: '25px', padding: '25px',
paddingTop: '5px', paddingTop: '5px',
width: '100%', width: '90%',
minHeight: '215px', minHeight: '215px',
alignItems: 'center', alignItems: 'center',
overflowY: 'auto', overflowY: 'auto',
@ -58,7 +58,9 @@ ShapeshiftForm.prototype.renderMain = function () {
}, },
}), }),
h('.input-container', [ h('.input-container', {
position: 'relative',
}, [
h('input#fromCoin.buy-inputs.ex-coins', { h('input#fromCoin.buy-inputs.ex-coins', {
type: 'text', type: 'text',
list: 'coinList', list: 'coinList',
@ -79,27 +81,31 @@ ShapeshiftForm.prototype.renderMain = function () {
style: { style: {
fontSize: '12px', fontSize: '12px',
color: '#F7861C', color: '#F7861C',
position: 'relative', position: 'absolute',
bottom: '48px',
left: '106px',
}, },
}), }),
]), ]),
h('.icon-control', [ h('.icon-control', {
h('i.fa.fa-refresh.fa-4.orange', { style: {
style: { position: 'relative',
bottom: '5px', },
left: '5px', }, [
color: '#F7861C', // Not visible on the screen, can't see it on master.
},
onClick: this.updateCoin.bind(this), // h('i.fa.fa-refresh.fa-4.orange', {
}), // style: {
// bottom: '5px',
// left: '5px',
// color: '#F7861C',
// },
// onClick: this.updateCoin.bind(this),
// }),
h('i.fa.fa-chevron-right.fa-4.orange', { h('i.fa.fa-chevron-right.fa-4.orange', {
style: { style: {
position: 'relative', position: 'absolute',
bottom: '26px', bottom: '35%',
left: '10px', left: '0%',
color: '#F7861C', color: '#F7861C',
}, },
onClick: this.updateCoin.bind(this), onClick: this.updateCoin.bind(this),
@ -117,69 +123,73 @@ ShapeshiftForm.prototype.renderMain = function () {
}, },
}), }),
]), ]),
h('.flex-column', { h('.flex-column', {
style: { style: {
marginTop: '1%',
alignItems: 'flex-start', alignItems: 'flex-start',
}, },
}, [ }, [
this.props.warning ? this.props.warning && h('span.error.flex-center', { this.props.warning
style: { ? this.props.warning
textAlign: 'center', && h('span.error.flex-center', {
width: '229px', style: {
height: '82px', textAlign: 'center',
}, width: '229px',
}, height: '82px',
this.props.warning) : this.renderInfo(), },
}, this.props.warning)
: this.renderInfo(),
this.renderRefundAddressForCoin(coin),
]), ]),
h(this.activeToggle('.input-container'), { ])
style: { }
padding: '10px',
paddingTop: '0px', ShapeshiftForm.prototype.renderRefundAddressForCoin = function (coin) {
width: '100%', return h(this.activeToggle('.input-container'), {
}, style: {
}, [ marginTop: '1%',
},
}, [
h('div', `${coin} Address:`), h('div', `${coin} Address:`),
h('input#fromCoinAddress.buy-inputs', { h('input#fromCoinAddress.buy-inputs', {
type: 'text', type: 'text',
placeholder: `Your ${coin} Refund Address`, placeholder: `Your ${coin} Refund Address`,
dataset: { dataset: {
persistentFormId: 'refund-address', persistentFormId: 'refund-address',
},
style: {
boxSizing: 'border-box',
width: '227px',
height: '30px',
padding: ' 5px ',
},
}),
h('i.fa.fa-pencil-square-o.edit-text', { },
style: { style: {
fontSize: '12px', boxSizing: 'border-box',
color: '#F7861C', width: '227px',
position: 'relative', height: '30px',
bottom: '10px', padding: ' 5px ',
right: '11px', },
}, }),
}),
h('.flex-row', { h('i.fa.fa-pencil-square-o.edit-text', {
style: {
fontSize: '12px',
color: '#F7861C',
position: 'absolute',
},
}),
h('div.flex-row', {
style: {
justifyContent: 'flex-start',
},
}, [
h('button', {
onClick: this.shift.bind(this),
style: { style: {
justifyContent: 'flex-end', marginTop: '1%',
}, },
}, [ },
h('button', { 'Submit'),
onClick: this.shift.bind(this),
style: {
marginTop: '10px',
position: 'relative',
bottom: '40px',
},
},
'Submit'),
]),
]), ]),
]) ])
} }

Loading…
Cancel
Save