mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-02 12:20:53 +00:00
use const font sizes instead of values
This commit is contained in:
parent
3c6ee60e9c
commit
42945c78c5
@ -9,6 +9,7 @@ import {
|
|||||||
} from 'utils/device';
|
} from 'utils/device';
|
||||||
import TrezorImage from 'components/images/TrezorImage';
|
import TrezorImage from 'components/images/TrezorImage';
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
|
import { FONT_SIZE } from 'config/variables';
|
||||||
|
|
||||||
const Wrapper = styled.div`
|
const Wrapper = styled.div`
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -57,7 +58,6 @@ const Name = styled.div`
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 14px;
|
|
||||||
color: ${colors.TEXT_PRIMARY};
|
color: ${colors.TEXT_PRIMARY};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ const Status = styled.div`
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font-size: 12px;
|
font-size: ${FONT_SIZE.SMALLER};
|
||||||
color: ${colors.TEXT_SECONDARY};
|
color: ${colors.TEXT_SECONDARY};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ import { bindActionCreators } from 'redux';
|
|||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
|
import { FONT_SIZE } from 'config/variables';
|
||||||
import * as LogActions from 'actions/LogActions';
|
import * as LogActions from 'actions/LogActions';
|
||||||
|
|
||||||
declare var COMMITHASH: string;
|
declare var COMMITHASH: string;
|
||||||
@ -21,7 +22,7 @@ type Props = {
|
|||||||
|
|
||||||
const Wrapper = styled.div`
|
const Wrapper = styled.div`
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 12px;
|
font-size: ${FONT_SIZE.SMALLER};
|
||||||
background: ${colors.LANDING};
|
background: ${colors.LANDING};
|
||||||
color: ${colors.TEXT_SECONDARY};
|
color: ${colors.TEXT_SECONDARY};
|
||||||
padding: 22px 48px;
|
padding: 22px 48px;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import styled, { css } from 'styled-components';
|
import styled, { css } from 'styled-components';
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
|
import { FONT_SIZE } from 'config/variables';
|
||||||
|
|
||||||
const baseStyles = css`
|
const baseStyles = css`
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
@ -12,36 +13,34 @@ const baseStyles = css`
|
|||||||
|
|
||||||
const H1 = styled.h1`
|
const H1 = styled.h1`
|
||||||
${baseStyles};
|
${baseStyles};
|
||||||
font-size: 18px;
|
font-size: ${FONT_SIZE.H1};
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const H2 = styled.h2`
|
const H2 = styled.h2`
|
||||||
${baseStyles};
|
${baseStyles};
|
||||||
font-size: 16px;
|
font-size: ${FONT_SIZE.H2};
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
|
|
||||||
${props => props.claim && css`
|
${props => props.claim
|
||||||
font-size: 36px;
|
&& css`
|
||||||
padding-bottom: 24px
|
font-size: ${FONT_SIZE.BIGGEST};
|
||||||
`}
|
padding-bottom: 24px;
|
||||||
|
`};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const H3 = styled.h3`
|
const H3 = styled.h3`
|
||||||
${baseStyles};
|
${baseStyles};
|
||||||
font-size: 14px;
|
font-size: ${FONT_SIZE.H3};
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const H4 = styled.h4`
|
const H4 = styled.h4`
|
||||||
${baseStyles};
|
${baseStyles};
|
||||||
font-size: 12px;
|
font-size: ${FONT_SIZE.H4};
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export {
|
export {
|
||||||
H1,
|
H1, H2, H3, H4,
|
||||||
H2,
|
};
|
||||||
H3,
|
|
||||||
H4,
|
|
||||||
};
|
|
||||||
|
@ -7,7 +7,7 @@ import Icon from 'components/Icon';
|
|||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
import { getPrimaryColor, getSecondaryColor } from 'utils/notification';
|
import { getPrimaryColor, getSecondaryColor } from 'utils/notification';
|
||||||
import Loader from 'components/Loader';
|
import Loader from 'components/Loader';
|
||||||
import { TRANSITION } from 'config/variables';
|
import { TRANSITION, FONT_SIZE } from 'config/variables';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
type: string;
|
type: string;
|
||||||
@ -38,7 +38,7 @@ const Wrapper = styled.button`
|
|||||||
padding: 12px 58px;
|
padding: 12px 58px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
font-size: 14px;
|
font-size: ${FONT_SIZE.SMALL};
|
||||||
position: relative;
|
position: relative;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -6,7 +6,7 @@ import styled from 'styled-components';
|
|||||||
|
|
||||||
import icons from 'config/icons';
|
import icons from 'config/icons';
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
import { LINE_HEIGHT } from 'config/variables';
|
import { LINE_HEIGHT, FONT_SIZE } from 'config/variables';
|
||||||
|
|
||||||
import P from 'components/Paragraph';
|
import P from 'components/Paragraph';
|
||||||
import Icon from 'components/Icon';
|
import Icon from 'components/Icon';
|
||||||
@ -43,7 +43,7 @@ const StyledP = styled(P)`
|
|||||||
|
|
||||||
const Label = styled.div`
|
const Label = styled.div`
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
font-size: 10px;
|
font-size: ${FONT_SIZE.SMALLER};
|
||||||
color: ${colors.TEXT_SECONDARY};
|
color: ${colors.TEXT_SECONDARY};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
@ -8,6 +8,11 @@ export const FONT_SIZE = {
|
|||||||
BIG: '21px',
|
BIG: '21px',
|
||||||
BIGGER: '32px',
|
BIGGER: '32px',
|
||||||
BIGGEST: '36px',
|
BIGGEST: '36px',
|
||||||
|
H1: '18px',
|
||||||
|
H2: '16px',
|
||||||
|
H3: '14px',
|
||||||
|
H4: '12px',
|
||||||
|
COUNTER: '11px',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const FONT_WEIGHT = {
|
export const FONT_WEIGHT = {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { css } from 'styled-components';
|
import { css } from 'styled-components';
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
|
import { FONT_SIZE } from 'config/variables';
|
||||||
|
|
||||||
const tooltipStyles = css`
|
const tooltipStyles = css`
|
||||||
.rc-tooltip {
|
.rc-tooltip {
|
||||||
@ -18,7 +19,7 @@ const tooltipStyles = css`
|
|||||||
.rc-tooltip-inner {
|
.rc-tooltip-inner {
|
||||||
padding: 8px 10px;
|
padding: 8px 10px;
|
||||||
color: ${colors.WHITE};
|
color: ${colors.WHITE};
|
||||||
font-size: 12px;
|
font-size: ${FONT_SIZE.SMALLER};
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@ -160,4 +161,4 @@ const tooltipStyles = css`
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export default tooltipStyles;
|
export default tooltipStyles;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { createGlobalStyle } from 'styled-components';
|
import { createGlobalStyle } from 'styled-components';
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
|
import { FONT_SIZE } from 'config/variables';
|
||||||
|
|
||||||
import tooltipStyles from './Tooltip';
|
import tooltipStyles from './Tooltip';
|
||||||
import animationStyles from './Animations';
|
import animationStyles from './Animations';
|
||||||
@ -11,7 +12,7 @@ const baseStyles = createGlobalStyle`
|
|||||||
position: relative;
|
position: relative;
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 14px;
|
font-size: ${FONT_SIZE.SMALL};
|
||||||
color: ${colors.TEXT};
|
color: ${colors.TEXT};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,4 +74,4 @@ const baseStyles = createGlobalStyle`
|
|||||||
${tooltipStyles};
|
${tooltipStyles};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export default baseStyles;
|
export default baseStyles;
|
||||||
|
@ -7,6 +7,7 @@ import { bindActionCreators } from 'redux';
|
|||||||
|
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
import icons from 'config/icons';
|
import icons from 'config/icons';
|
||||||
|
import { FONT_SIZE } from 'config/variables';
|
||||||
|
|
||||||
import Icon from 'components/Icon';
|
import Icon from 'components/Icon';
|
||||||
import Button from 'components/Button';
|
import Button from 'components/Button';
|
||||||
@ -40,7 +41,7 @@ const ModalWindow = styled.div`
|
|||||||
|
|
||||||
const StyledP = styled(P)`
|
const StyledP = styled(P)`
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
font-size: 14px;
|
font-size: ${FONT_SIZE.SMALL};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledButton = styled(Button)`
|
const StyledButton = styled(Button)`
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
|
import { FONT_SIZE } from 'config/variables';
|
||||||
import Icon from 'components/Icon';
|
import Icon from 'components/Icon';
|
||||||
import WalletTypeIcon from 'components/images/WalletType';
|
import WalletTypeIcon from 'components/images/WalletType';
|
||||||
import icons from 'config/icons';
|
import icons from 'config/icons';
|
||||||
@ -30,7 +31,7 @@ const Counter = styled.div`
|
|||||||
height: 24px;
|
height: 24px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 11px;
|
font-size: ${FONT_SIZE.COUNTER};
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -68,7 +69,7 @@ const Help = styled.div`
|
|||||||
|
|
||||||
const A = styled.a`
|
const A = styled.a`
|
||||||
color: ${colors.TEXT_SECONDARY};
|
color: ${colors.TEXT_SECONDARY};
|
||||||
font-size: 12px;
|
font-size: ${FONT_SIZE.SMALLER};
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
Loading…
Reference in New Issue
Block a user