1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-06-25 09:22:35 +00:00

Added button

This commit is contained in:
Vladimir Volek 2018-11-15 13:15:23 +01:00 committed by Szymon Lesisz
parent b151c9715b
commit 4b55bde476

View File

@ -9,6 +9,7 @@ import Textarea from 'components/Textarea';
import Tooltip from 'components/Tooltip'; import Tooltip from 'components/Tooltip';
import Icon from 'components/Icon'; import Icon from 'components/Icon';
import ICONS from 'config/icons'; import ICONS from 'config/icons';
import { FONT_SIZE } from 'config/variables';
import type { Props as BaseProps } from '../../Container'; import type { Props as BaseProps } from '../../Container';
@ -28,6 +29,7 @@ const InputRow = styled.div`
const InputLabelWrapper = styled.div` const InputLabelWrapper = styled.div`
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between;
`; `;
const GreenSpan = styled.span` const GreenSpan = styled.span`
@ -110,6 +112,18 @@ const getDataTextareaState = (dataError: string, dataWarning: string): string =>
return state; return state;
}; };
const Left = styled.div`
display: flex;
align-items: center;
`;
const Right = styled.div`
display: flex;
flex-direction: row;
font-size: ${FONT_SIZE.SMALLER};
cursor: pointer;
`;
// stateless component // stateless component
const AdvancedForm = (props: Props) => { const AdvancedForm = (props: Props) => {
const { const {
@ -155,6 +169,7 @@ const AdvancedForm = (props: Props) => {
spellCheck="false" spellCheck="false"
topLabel={( topLabel={(
<InputLabelWrapper> <InputLabelWrapper>
<Left>
Gas limit Gas limit
<Tooltip <Tooltip
content={( content={(
@ -174,6 +189,10 @@ const AdvancedForm = (props: Props) => {
size={24} size={24}
/> />
</Tooltip> </Tooltip>
</Left>
<Right>
Set default
</Right>
</InputLabelWrapper> </InputLabelWrapper>
)} )}
bottomText={errors.gasLimit || warnings.gasLimit || infos.gasLimit || (calculatingGasLimit ? 'Calculating...' : '')} bottomText={errors.gasLimit || warnings.gasLimit || infos.gasLimit || (calculatingGasLimit ? 'Calculating...' : '')}