Skip to content
This repository was archived by the owner on Aug 10, 2023. It is now read-only.

Latest commit

 

History

History
44 lines (33 loc) · 748 Bytes

File metadata and controls

44 lines (33 loc) · 748 Bytes

react-pdf logo

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