From 165f0416317b6ea1cc12bb5f92bc2f6b6221c603 Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Mon, 8 Oct 2018 18:37:32 +0200 Subject: [PATCH] Remove differences between webpack and parcel samples --- sample/parcel/Sample.jsx | 1 + sample/webpack/Sample.jsx | 5 +---- sample/webpack/index.jsx | 5 +++++ 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 sample/webpack/index.jsx diff --git a/sample/parcel/Sample.jsx b/sample/parcel/Sample.jsx index 61a27ba2f..9e54c81a1 100644 --- a/sample/parcel/Sample.jsx +++ b/sample/parcel/Sample.jsx @@ -1,5 +1,6 @@ import React, { Component } from 'react'; import { Document, Page } from 'react-pdf/dist/entry.parcel'; +import 'react-pdf/dist/Page/AnnotationLayer.css'; import './Sample.less'; diff --git a/sample/webpack/Sample.jsx b/sample/webpack/Sample.jsx index 0ec52251a..21b806738 100644 --- a/sample/webpack/Sample.jsx +++ b/sample/webpack/Sample.jsx @@ -1,5 +1,4 @@ import React, { Component } from 'react'; -import { render } from 'react-dom'; import { Document, Page } from 'react-pdf/dist/entry.webpack'; import 'react-pdf/dist/Page/AnnotationLayer.css'; @@ -10,7 +9,7 @@ const options = { cMapPacked: true, }; -class Sample extends Component { +export default class Sample extends Component { state = { file: './sample.pdf', numPages: null, @@ -67,5 +66,3 @@ class Sample extends Component { ); } } - -render(, document.getElementById('react-container')); diff --git a/sample/webpack/index.jsx b/sample/webpack/index.jsx new file mode 100644 index 000000000..1e6703982 --- /dev/null +++ b/sample/webpack/index.jsx @@ -0,0 +1,5 @@ +import React from 'react'; +import { render } from 'react-dom'; +import Sample from './Sample'; + +render(, document.getElementById('react-container'));