mirror of https://github.com/trezor/trezor-wallet
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
800 B
35 lines
800 B
import React from 'react';
|
|
import styled, { css } from 'styled-components';
|
|
import PropTypes from 'prop-types';
|
|
import colors from 'config/colors';
|
|
import { FONT_SIZE, LINE_HEIGHT } from 'config/variables';
|
|
|
|
const Wrapper = styled.p`
|
|
font-size: ${FONT_SIZE.BASE};
|
|
line-height: ${LINE_HEIGHT.BASE};
|
|
color: ${colors.TEXT_SECONDARY};
|
|
|
|
${props => props.isSmaller && css`
|
|
font-size: ${FONT_SIZE.SMALLER};
|
|
`}
|
|
`;
|
|
|
|
const P = ({ children, className, isSmaller = false }) => (
|
|
<Wrapper
|
|
className={className}
|
|
isSmaller={isSmaller}
|
|
>{children}
|
|
</Wrapper>
|
|
);
|
|
|
|
P.propTypes = {
|
|
className: PropTypes.string,
|
|
isSmaller: PropTypes.bool,
|
|
children: PropTypes.oneOfType([
|
|
PropTypes.array,
|
|
PropTypes.string,
|
|
]),
|
|
};
|
|
|
|
export default P;
|