mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-20 04:50:58 +00:00
Added common title components for wallet views
This commit is contained in:
parent
778d08a898
commit
6461400853
@ -3,6 +3,7 @@ export default {
|
|||||||
BACKGROUND: '#EBEBEB',
|
BACKGROUND: '#EBEBEB',
|
||||||
|
|
||||||
TEXT: '#333333',
|
TEXT: '#333333',
|
||||||
|
WALLET_VIEW_TITLE: '#505050',
|
||||||
|
|
||||||
HEADER: '#1A1A1A',
|
HEADER: '#1A1A1A',
|
||||||
BODY: '#E3E3E3',
|
BODY: '#E3E3E3',
|
||||||
|
@ -4,6 +4,7 @@ export const FONT_SIZE = {
|
|||||||
SMALL: '14px',
|
SMALL: '14px',
|
||||||
BASE: '16px',
|
BASE: '16px',
|
||||||
TOP_MENU: '17px',
|
TOP_MENU: '17px',
|
||||||
|
WALLET_TITLE: '18px',
|
||||||
BIG: '21px',
|
BIG: '21px',
|
||||||
BIGGER: '32px',
|
BIGGER: '32px',
|
||||||
BIGGEST: '36px',
|
BIGGEST: '36px',
|
||||||
|
25
src/views/Wallet/components/Title/index.js
Normal file
25
src/views/Wallet/components/Title/index.js
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
import colors from 'config/colors';
|
||||||
|
import { FONT_SIZE, FONT_WEIGHT } from 'config/variables';
|
||||||
|
|
||||||
|
const Wrapper = styled.div`
|
||||||
|
font-size: ${FONT_SIZE.WALLET_TITLE};
|
||||||
|
font-weight: ${FONT_WEIGHT.BASE};
|
||||||
|
color: ${colors.WALLET_TITLE};
|
||||||
|
`;
|
||||||
|
|
||||||
|
const Title = ({
|
||||||
|
children,
|
||||||
|
}) => (
|
||||||
|
<Wrapper>
|
||||||
|
{children}
|
||||||
|
</Wrapper>
|
||||||
|
);
|
||||||
|
|
||||||
|
Title.propTypes = {
|
||||||
|
children: PropTypes.element,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Title;
|
@ -1,7 +1,6 @@
|
|||||||
/* @flow */
|
/* @flow */
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled, { css } from 'styled-components';
|
import styled, { css } from 'styled-components';
|
||||||
import { H2 } from 'components/Heading';
|
|
||||||
import Button from 'components/Button';
|
import Button from 'components/Button';
|
||||||
import Icon from 'components/Icon';
|
import Icon from 'components/Icon';
|
||||||
import ICONS from 'config/icons';
|
import ICONS from 'config/icons';
|
||||||
@ -12,6 +11,7 @@ import Tooltip from 'components/Tooltip';
|
|||||||
import { QRCode } from 'react-qr-svg';
|
import { QRCode } from 'react-qr-svg';
|
||||||
|
|
||||||
import { FONT_SIZE, FONT_WEIGHT, FONT_FAMILY } from 'config/variables';
|
import { FONT_SIZE, FONT_WEIGHT, FONT_FAMILY } from 'config/variables';
|
||||||
|
import Title from 'views/Wallet/components/Title';
|
||||||
import VerifyAddressTooltip from './components/VerifyAddressTooltip';
|
import VerifyAddressTooltip from './components/VerifyAddressTooltip';
|
||||||
|
|
||||||
import type { Props } from './Container';
|
import type { Props } from './Container';
|
||||||
@ -159,7 +159,7 @@ const AccountReceive = (props: Props) => {
|
|||||||
return (
|
return (
|
||||||
<Content>
|
<Content>
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<H2>Receive Ethereum or tokens</H2>
|
<Title>Receive Ethereum or tokens</Title>
|
||||||
<AddressWrapper
|
<AddressWrapper
|
||||||
isShowingQrCode={addressVerified || addressUnverified}
|
isShowingQrCode={addressVerified || addressUnverified}
|
||||||
>
|
>
|
||||||
|
@ -10,8 +10,8 @@ import Link from 'components/Link';
|
|||||||
import ICONS from 'config/icons';
|
import ICONS from 'config/icons';
|
||||||
import { FONT_SIZE, FONT_WEIGHT, TRANSITION } from 'config/variables';
|
import { FONT_SIZE, FONT_WEIGHT, TRANSITION } from 'config/variables';
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
|
import Title from 'views/Wallet/components/Title';
|
||||||
import P from 'components/Paragraph';
|
import P from 'components/Paragraph';
|
||||||
import { H2 } from 'components/Heading';
|
|
||||||
import Content from 'views/Wallet/components/Content';
|
import Content from 'views/Wallet/components/Content';
|
||||||
import type { Token } from 'flowtype';
|
import type { Token } from 'flowtype';
|
||||||
import AdvancedForm from './components/AdvancedForm';
|
import AdvancedForm from './components/AdvancedForm';
|
||||||
@ -248,7 +248,7 @@ const AccountSend = (props: Props) => {
|
|||||||
return (
|
return (
|
||||||
<Content>
|
<Content>
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<H2>Send Ethereum or tokens</H2>
|
<Title>Send Ethereum or tokens</Title>
|
||||||
<InputRow>
|
<InputRow>
|
||||||
<Input
|
<Input
|
||||||
state={getAddressInputState(address, errors.address, warnings.address)}
|
state={getAddressInputState(address, errors.address, warnings.address)}
|
||||||
|
@ -2,10 +2,9 @@ import React from 'react';
|
|||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import Input from 'components/inputs/Input';
|
import Input from 'components/inputs/Input';
|
||||||
import Textarea from 'components/Textarea';
|
import Textarea from 'components/Textarea';
|
||||||
|
import Title from 'views/Wallet/components/Title';
|
||||||
import Button from 'components/Button';
|
import Button from 'components/Button';
|
||||||
import Content from 'views/Wallet/components/Content';
|
import Content from 'views/Wallet/components/Content';
|
||||||
|
|
||||||
import { H2 } from 'components/Heading';
|
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
|
|
||||||
const Wrapper = styled.div`
|
const Wrapper = styled.div`
|
||||||
@ -49,7 +48,7 @@ const Label = styled.div`
|
|||||||
|
|
||||||
const AccountSignVerify = () => (
|
const AccountSignVerify = () => (
|
||||||
<Content>
|
<Content>
|
||||||
<H2>Sign & Verify</H2>
|
<Title>Sign & Verify</Title>
|
||||||
<Wrapper>
|
<Wrapper>
|
||||||
<Sign>
|
<Sign>
|
||||||
<Row>
|
<Row>
|
||||||
|
@ -7,6 +7,7 @@ import Icon from 'components/Icon';
|
|||||||
import { AsyncSelect } from 'components/Select';
|
import { AsyncSelect } from 'components/Select';
|
||||||
import ICONS from 'config/icons';
|
import ICONS from 'config/icons';
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
|
import Title from 'views/Wallet/components/Title';
|
||||||
import Tooltip from 'components/Tooltip';
|
import Tooltip from 'components/Tooltip';
|
||||||
import Content from 'views/Wallet/components/Content';
|
import Content from 'views/Wallet/components/Content';
|
||||||
|
|
||||||
@ -82,7 +83,7 @@ const AccountSummary = (props: Props) => {
|
|||||||
<AccountHeading>
|
<AccountHeading>
|
||||||
<AccountName>
|
<AccountName>
|
||||||
<StyledCoinLogo coinNetwork={account.network} />
|
<StyledCoinLogo coinNetwork={account.network} />
|
||||||
<H2>Account #{parseInt(account.index, 10) + 1}</H2>
|
<Title>Account #{parseInt(account.index, 10) + 1}</Title>
|
||||||
</AccountName>
|
</AccountName>
|
||||||
<Link href={explorerLink} isGray>See full transaction history</Link>
|
<Link href={explorerLink} isGray>See full transaction history</Link>
|
||||||
</AccountHeading>
|
</AccountHeading>
|
||||||
|
Loading…
Reference in New Issue
Block a user