1.4.0 • Published 5 years ago

@react-pdf/styled-components v1.4.0

Weekly downloads
10,216
License
MIT
Repository
-
Last release
5 years ago

styled-components

styled-components bindings for react-pdf

Installation

yarn add @react-pdf/styled-components

Usage

@react-pdf/styled-components follows the same styled-components API

import styled from ''@react-pdf/styled-components';

const Heading = styled.Text`
  margin: 10px;
  font-size: 22px;
  font-family: 'Helvetica';
`;

const MyDocument = () => (
  <Document>
    <Page>
      <Heading>
        D'oh!
      </Heading>
    </Page>
  </Document>
)

Supported components

  • Document
  • Page
  • View
  • Image
  • Text
  • Link