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.
trezor-wallet/src/components/Paragraph/index.js

34 lines
775 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.BIG};
line-height: ${LINE_HEIGHT.BASE};
color: ${colors.TEXT_SECONDARY};
padding: 0;
margin: 0;
${props =>
props.isSmaller &&
css`
font-size: ${FONT_SIZE.SMALL};
`}
`;
const P = ({ children, className, isSmaller = false }) => (
<Wrapper className={className} isSmaller={isSmaller}>
{children}
</Wrapper>
);
P.propTypes = {
className: PropTypes.string,
isSmaller: PropTypes.bool,
children: PropTypes.node,
};
export default P;