moar trezor-ui-components

pull/463/head
slowbackspace 5 years ago
parent 5efba574e3
commit 1c6383ff50

@ -3,17 +3,13 @@ import React from 'react';
import { QRCode } from 'react-qr-svg';
import styled from 'styled-components';
import { FormattedMessage } from 'react-intl';
import { Button, Icon, Tooltip, Input, icons as ICONS } from 'trezor-ui-components';
import { Button, Icon, Tooltip, Input, colors, icons as ICONS } from 'trezor-ui-components';
import Title from 'views/Wallet/components/Title';
import DeviceIcon from 'components/images/DeviceIcon';
import colors from 'config/colors';
import { CONTEXT_DEVICE } from 'actions/constants/modal';
import Content from 'views/Wallet/components/Content';
import { CONTEXT_DEVICE } from 'actions/constants/modal';
import l10nCommonMessages from 'views/common.messages';
import VerifyAddressTooltip from '../components/VerifyAddressTooltip';
import l10nMessages from './index.messages';
import l10nReceiveMessages from '../common.messages';

@ -4,15 +4,10 @@ import { QRCode } from 'react-qr-svg';
import styled from 'styled-components';
import { FormattedMessage } from 'react-intl';
import { Button, Icon, Tooltip, Input, colors, icons as ICONS } from 'trezor-ui-components';
import Title from 'views/Wallet/components/Title';
import Button from 'components/Button';
import Icon from 'components/Icon';
import Tooltip from 'components/Tooltip';
import Input from 'components/inputs/Input';
import DeviceIcon from 'components/images/DeviceIcon';
import ICONS from 'config/icons';
import colors from 'config/colors';
import { CONTEXT_DEVICE } from 'actions/constants/modal';
import Content from 'views/Wallet/components/Content';
@ -179,8 +174,8 @@ const AccountReceive = (props: Props) => {
<ShowAddressButton
onClick={() => props.showAddress(account.accountPath)}
isDisabled={device.connected && !discovery.completed}
icon={ICONS.EYE}
>
<ShowAddressIcon icon={ICONS.EYE} color={colors.WHITE} />
<FormattedMessage {...l10nReceiveMessages.TR_SHOW_FULL_ADDRESS} />
</ShowAddressButton>
)}

@ -2,7 +2,6 @@
import * as React from 'react';
import styled from 'styled-components';
import colors from 'config/colors';
import { FormattedMessage, injectIntl } from 'react-intl';
import {
Link,
@ -10,6 +9,7 @@ import {
TextArea as Textarea,
Tooltip,
Icon,
colors,
icons as ICONS,
} from 'trezor-ui-components';
import { FONT_SIZE } from 'config/variables';

@ -3,13 +3,10 @@
import React from 'react';
import BigNumber from 'bignumber.js';
import styled, { css } from 'styled-components';
import { Select, Button, Input, Link, Icon } from 'trezor-ui-components';
import ICONS from 'config/icons';
import { Select, Button, Input, Link, Icon, P, colors, icons as ICONS } from 'trezor-ui-components';
import { FONT_SIZE, FONT_WEIGHT, TRANSITION, SCREEN_SIZE } from 'config/variables';
import { FIAT_CURRENCIES } from 'config/app';
import colors from 'config/colors';
import Title from 'views/Wallet/components/Title';
import P from 'components/Paragraph';
import Content from 'views/Wallet/components/Content';
import * as stateUtils from 'reducers/utils';
import type { Token } from 'flowtype';
@ -22,10 +19,6 @@ import l10nMessages from './index.messages';
import l10nSendMessages from '../../common.messages';
import type { Props } from './Container';
// TODO: Decide on a small screen width for the whole app
// and put it inside config/variables.js
const SmallScreenWidth = '850px';
const AmountInputLabelWrapper = styled.div`
display: flex;
justify-content: space-between;
@ -172,7 +165,7 @@ const ToggleAdvancedSettingsWrapper = styled.div`
flex-direction: row;
justify-content: space-between;
@media screen and (max-width: ${SmallScreenWidth}) {
@media screen and (max-width: ${SCREEN_SIZE.MD}) {
${props =>
props.isAdvancedSettingsHidden &&
css`
@ -194,7 +187,7 @@ const FormButtons = styled.div`
display: flex;
flex: 1 1;
@media screen and (max-width: ${SmallScreenWidth}) {
@media screen and (max-width: ${SCREEN_SIZE.MD}) {
margin-top: ${props => (props.isAdvancedSettingsHidden ? '10px' : 0)};
}

@ -3,13 +3,9 @@
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import styled from 'styled-components';
import colors from 'config/colors';
import { Input, Tooltip, Icon, colors, icons as ICONS } from 'trezor-ui-components';
import l10nSendMessages from 'views/Wallet/views/Account/common.messages';
import Input from 'components/inputs/Input';
import Tooltip from 'components/Tooltip';
import Icon from 'components/Icon';
import ICONS from 'config/icons';
import l10nMessages from './index.messages';
import type { Props as BaseProps } from '../../Container';

@ -2,18 +2,12 @@
import React from 'react';
import styled, { css } from 'styled-components';
import { Select } from 'components/Select';
import { FormattedMessage } from 'react-intl';
import Button from 'components/Button';
import Input from 'components/inputs/Input';
import Icon from 'components/Icon';
import Link from 'components/Link';
import ICONS from 'config/icons';
import { Button, Select, Input, Icon, Link, P, colors, icons as ICONS } from 'trezor-ui-components';
import { FONT_SIZE, FONT_WEIGHT, TRANSITION, SCREEN_SIZE } from 'config/variables';
import { FIAT_CURRENCIES } from 'config/app';
import colors from 'config/colors';
import Title from 'views/Wallet/components/Title';
import P from 'components/Paragraph';
import l10nCommonMessages from 'views/common.messages';
import Content from 'views/Wallet/components/Content';
import PendingTransactions from '../components/PendingTransactions';
@ -24,10 +18,6 @@ import l10nSendMessages from '../../common.messages';
import type { Props } from './Container';
// TODO: Decide on a small screen width for the whole app
// and put it inside config/variables.js
const SmallScreenWidth = '850px';
const AmountInputLabelWrapper = styled.div`
display: flex;
justify-content: space-between;
@ -136,7 +126,7 @@ const ToggleAdvancedSettingsWrapper = styled.div`
flex-direction: row;
justify-content: space-between;
@media screen and (max-width: ${SmallScreenWidth}) {
@media screen and (max-width: ${SCREEN_SIZE.MD}) {
${props =>
props.isAdvancedSettingsHidden &&
css`
@ -158,7 +148,7 @@ const FormButtons = styled.div`
display: flex;
flex: 1 1;
@media screen and (max-width: ${SmallScreenWidth}) {
@media screen and (max-width: ${SCREEN_SIZE.MD}) {
margin-top: ${props => (props.isAdvancedSettingsHidden ? '10px' : 0)};
}

@ -1,21 +1,15 @@
/* @flow */
import styled from 'styled-components';
import React from 'react';
import { H2 } from 'components/Heading';
import styled from 'styled-components';
import BigNumber from 'bignumber.js';
import Icon from 'components/Icon';
import { AsyncSelect } from 'components/Select';
import ICONS from 'config/icons';
import colors from 'config/colors';
import Tooltip from 'components/Tooltip';
import Content from 'views/Wallet/components/Content';
import * as stateUtils from 'reducers/utils';
import { FormattedMessage } from 'react-intl';
import l10nCommonMessages from 'views/common.messages';
import { H5, Icon, Link, AsyncSelect, Tooltip, colors, icons as ICONS } from 'trezor-ui-components';
import Content from 'views/Wallet/components/Content';
import CoinLogo from 'components/images/CoinLogo';
import * as stateUtils from 'reducers/utils';
import Link from 'components/Link';
import { FONT_WEIGHT, FONT_SIZE } from 'config/variables';
import l10nCommonMessages from 'views/common.messages';
import l10nSummaryMessages from '../common.messages';
import AccountBalance from '../components/Balance';
import AddedToken from '../components/Token';
@ -30,17 +24,12 @@ const AccountHeading = styled.div`
align-items: center;
`;
const H2Wrapper = styled.div`
const TokensHeadingWrapper = styled.div`
display: flex;
align-items: center;
padding: 20px 0;
`;
const StyledTooltip = styled(Tooltip)`
position: relative;
top: 2px;
`;
const AccountName = styled.div`
display: flex;
justify-content: center;
@ -62,6 +51,10 @@ const StyledIcon = styled(Icon)`
}
`;
const StyledLink = styled(Link)`
font-size: ${FONT_SIZE.SMALL};
`;
const AsyncSelectWrapper = styled.div`
padding-bottom: 32px;
`;
@ -94,11 +87,11 @@ const AccountSummary = (props: Props) => {
/>
</AccountTitle>
</AccountName>
<Link href={explorerLink} isGray>
<StyledLink href={explorerLink} isGray>
<FormattedMessage
{...l10nSummaryMessages.TR_SEE_FULL_TRANSACTION_HISTORY}
/>
</Link>
</StyledLink>
</AccountHeading>
<AccountBalance
network={network}
@ -106,18 +99,18 @@ const AccountSummary = (props: Props) => {
fiat={props.fiat}
localCurrency={props.wallet.localCurrency}
/>
<H2Wrapper>
<H2>
<TokensHeadingWrapper>
<H5>
<FormattedMessage {...l10nSummaryMessages.TR_TOKENS} />
</H2>
<StyledTooltip
</H5>
<Tooltip
maxWidth={200}
placement="top"
content={props.intl.formatMessage(l10nSummaryMessages.TR_INSERT_TOKEN_NAME)}
>
<StyledIcon icon={ICONS.HELP} color={colors.TEXT_SECONDARY} size={24} />
</StyledTooltip>
</H2Wrapper>
</Tooltip>
</TokensHeadingWrapper>
<AsyncSelectWrapper>
<AsyncSelect
isSearchable

@ -1,17 +1,16 @@
/* @flow */
import styled from 'styled-components';
import React from 'react';
import { H2 } from 'components/Heading';
import styled from 'styled-components';
import BigNumber from 'bignumber.js';
import colors from 'config/colors';
import Content from 'views/Wallet/components/Content';
import { FormattedMessage } from 'react-intl';
import l10nCommonMessages from 'views/common.messages';
import * as stateUtils from 'reducers/utils';
import { H5, Link, colors } from 'trezor-ui-components';
import CoinLogo from 'components/images/CoinLogo';
import * as stateUtils from 'reducers/utils';
import Link from 'components/Link';
import Content from 'views/Wallet/components/Content';
import { FONT_WEIGHT, FONT_SIZE } from 'config/variables';
import l10nCommonMessages from 'views/common.messages';
import l10nSummaryMessages from '../common.messages';
import AccountBalance from './components/Balance';
@ -24,7 +23,7 @@ const AccountHeading = styled.div`
align-items: center;
`;
const H2Wrapper = styled.div`
const HeadingWrapper = styled.div`
display: flex;
align-items: center;
padding: 20px 0;
@ -88,11 +87,11 @@ const AccountSummary = (props: Props) => {
localCurrency={props.wallet.localCurrency}
/>
{TMP_SHOW_HISTORY && (
<H2Wrapper>
<H2>
<HeadingWrapper>
<H5>
<FormattedMessage {...l10nSummaryMessages.TR_HISTORY} />
</H2>
</H2Wrapper>
</H5>
</HeadingWrapper>
)}
</React.Fragment>
</Content>

Loading…
Cancel
Save