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'));