1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-24 16:08:11 +00:00

Fix AdvanceForm composition for a smaller screen width

This commit is contained in:
Vasek Mlejnsky 2018-09-24 10:45:40 +02:00
parent 86fbce53a5
commit 162ddebd6c

View File

@ -13,6 +13,11 @@ import ICONS from 'config/icons';
import type { Props } from '../../Container'; import type { Props } from '../../Container';
// TODO: Decide on a small screen width for the whole app
// and put it inside config/variables.js
// same variable also in "AccountSend/index.js"
const SmallScreenWidth = '850px';
const InputRow = styled.div` const InputRow = styled.div`
margin-bottom: 20px; margin-bottom: 20px;
`; `;
@ -38,12 +43,24 @@ const AdvancedSettingsWrapper = styled.div`
const GasInputRow = styled(InputRow)` const GasInputRow = styled(InputRow)`
width: 100%; width: 100%;
display: flex; display: flex;
@media screen and (max-width: ${SmallScreenWidth}) {
flex-direction: column;
}
`; `;
const GasInput = styled(Input)` const GasInput = styled(Input)`
min-height: 85px;
&:first-child { &:first-child {
padding-right: 20px; padding-right: 20px;
} }
@media screen and (max-width: ${SmallScreenWidth}) {
&:first-child {
padding-right: 0;
margin-bottom: 2px;
}
}
`; `;
const StyledTextarea = styled(Textarea)` const StyledTextarea = styled(Textarea)`
@ -204,7 +221,7 @@ const AdvancedForm = (props: Props) => {
</InputLabelWrapper> </InputLabelWrapper>
)} )}
bottomText={errors.data || warnings.data || infos.data} bottomText={errors.data || warnings.data || infos.data}
disabled={networkSymbol !== currency} isDisabled={networkSymbol !== currency}
value={networkSymbol !== currency ? '' : data} value={networkSymbol !== currency ? '' : data}
onChange={event => onDataChange(event.target.value)} onChange={event => onDataChange(event.target.value)}
/> />