diff --git a/sample/create-react-app-5/src/Sample.tsx b/sample/create-react-app-5/src/Sample.tsx index f6140ee7e..59e1e9a0b 100644 --- a/sample/create-react-app-5/src/Sample.tsx +++ b/sample/create-react-app-5/src/Sample.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { pdfjs, Document, Page } from 'react-pdf'; import 'react-pdf/dist/esm/Page/AnnotationLayer.css'; import 'react-pdf/dist/esm/Page/TextLayer.css'; diff --git a/sample/create-react-app-5/src/index.tsx b/sample/create-react-app-5/src/index.tsx index 7cc7f6c96..d94d4c5a1 100644 --- a/sample/create-react-app-5/src/index.tsx +++ b/sample/create-react-app-5/src/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { createRoot } from 'react-dom/client'; import Sample from './Sample'; diff --git a/sample/create-react-app-5/tsconfig.json b/sample/create-react-app-5/tsconfig.json index ec838a469..a984cef20 100644 --- a/sample/create-react-app-5/tsconfig.json +++ b/sample/create-react-app-5/tsconfig.json @@ -3,7 +3,7 @@ "declaration": true, "esModuleInterop": true, "isolatedModules": true, - "jsx": "react", + "jsx": "react-jsx", "module": "esnext", "moduleResolution": "node", "noUncheckedIndexedAccess": true, diff --git a/sample/parcel2/Sample.tsx b/sample/parcel2/Sample.tsx index 3df7d355a..2e9c5b3fe 100644 --- a/sample/parcel2/Sample.tsx +++ b/sample/parcel2/Sample.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { pdfjs, Document, Page } from 'react-pdf'; import 'react-pdf/dist/esm/Page/AnnotationLayer.css'; import 'react-pdf/dist/esm/Page/TextLayer.css'; diff --git a/sample/parcel2/index.tsx b/sample/parcel2/index.tsx index 441fe6eb3..e9d48690b 100644 --- a/sample/parcel2/index.tsx +++ b/sample/parcel2/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { createRoot } from 'react-dom/client'; import Sample from './Sample.js'; diff --git a/sample/parcel2/tsconfig.json b/sample/parcel2/tsconfig.json index ec838a469..a984cef20 100644 --- a/sample/parcel2/tsconfig.json +++ b/sample/parcel2/tsconfig.json @@ -3,7 +3,7 @@ "declaration": true, "esModuleInterop": true, "isolatedModules": true, - "jsx": "react", + "jsx": "react-jsx", "module": "esnext", "moduleResolution": "node", "noUncheckedIndexedAccess": true, diff --git a/sample/vite3/Sample.tsx b/sample/vite3/Sample.tsx index f6140ee7e..59e1e9a0b 100644 --- a/sample/vite3/Sample.tsx +++ b/sample/vite3/Sample.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { pdfjs, Document, Page } from 'react-pdf'; import 'react-pdf/dist/esm/Page/AnnotationLayer.css'; import 'react-pdf/dist/esm/Page/TextLayer.css'; diff --git a/sample/vite3/index.tsx b/sample/vite3/index.tsx index 441fe6eb3..e9d48690b 100644 --- a/sample/vite3/index.tsx +++ b/sample/vite3/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { createRoot } from 'react-dom/client'; import Sample from './Sample.js'; diff --git a/sample/vite3/tsconfig.json b/sample/vite3/tsconfig.json index ec838a469..a984cef20 100644 --- a/sample/vite3/tsconfig.json +++ b/sample/vite3/tsconfig.json @@ -3,7 +3,7 @@ "declaration": true, "esModuleInterop": true, "isolatedModules": true, - "jsx": "react", + "jsx": "react-jsx", "module": "esnext", "moduleResolution": "node", "noUncheckedIndexedAccess": true, diff --git a/sample/vite4/Sample.tsx b/sample/vite4/Sample.tsx index f6140ee7e..59e1e9a0b 100644 --- a/sample/vite4/Sample.tsx +++ b/sample/vite4/Sample.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { pdfjs, Document, Page } from 'react-pdf'; import 'react-pdf/dist/esm/Page/AnnotationLayer.css'; import 'react-pdf/dist/esm/Page/TextLayer.css'; diff --git a/sample/vite4/index.tsx b/sample/vite4/index.tsx index 441fe6eb3..e9d48690b 100644 --- a/sample/vite4/index.tsx +++ b/sample/vite4/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { createRoot } from 'react-dom/client'; import Sample from './Sample.js'; diff --git a/sample/vite4/tsconfig.json b/sample/vite4/tsconfig.json index ec838a469..a984cef20 100644 --- a/sample/vite4/tsconfig.json +++ b/sample/vite4/tsconfig.json @@ -3,7 +3,7 @@ "declaration": true, "esModuleInterop": true, "isolatedModules": true, - "jsx": "react", + "jsx": "react-jsx", "module": "esnext", "moduleResolution": "node", "noUncheckedIndexedAccess": true, diff --git a/sample/webpack5/Sample.tsx b/sample/webpack5/Sample.tsx index f6140ee7e..59e1e9a0b 100644 --- a/sample/webpack5/Sample.tsx +++ b/sample/webpack5/Sample.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { pdfjs, Document, Page } from 'react-pdf'; import 'react-pdf/dist/esm/Page/AnnotationLayer.css'; import 'react-pdf/dist/esm/Page/TextLayer.css'; diff --git a/sample/webpack5/index.tsx b/sample/webpack5/index.tsx index 441fe6eb3..e9d48690b 100644 --- a/sample/webpack5/index.tsx +++ b/sample/webpack5/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { createRoot } from 'react-dom/client'; import Sample from './Sample.js'; diff --git a/sample/webpack5/tsconfig.json b/sample/webpack5/tsconfig.json index f96eba6e4..bc2f7cb7b 100644 --- a/sample/webpack5/tsconfig.json +++ b/sample/webpack5/tsconfig.json @@ -3,7 +3,7 @@ "declaration": true, "esModuleInterop": true, "isolatedModules": true, - "jsx": "react", + "jsx": "react-jsx", "module": "esnext", "moduleResolution": "node", "noUncheckedIndexedAccess": true, diff --git a/test/AnnotationOptions.tsx b/test/AnnotationOptions.tsx index 22891efdc..d0509ebf3 100644 --- a/test/AnnotationOptions.tsx +++ b/test/AnnotationOptions.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import type { ExternalLinkTarget } from './shared/types.js'; type AnnotationOptionsProps = { diff --git a/test/LayerOptions.tsx b/test/LayerOptions.tsx index 92c740b1c..42e7aef48 100644 --- a/test/LayerOptions.tsx +++ b/test/LayerOptions.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - type LayerOptionsProps = { renderAnnotationLayer: boolean; renderForms: boolean; diff --git a/test/PassingOptions.tsx b/test/PassingOptions.tsx index 1bc5086bb..915c56f8b 100644 --- a/test/PassingOptions.tsx +++ b/test/PassingOptions.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { isDataURI } from './shared/utils.js'; import type { File, PassMethod } from './shared/types.js'; diff --git a/test/tsconfig.json b/test/tsconfig.json index ec838a469..a984cef20 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -3,7 +3,7 @@ "declaration": true, "esModuleInterop": true, "isolatedModules": true, - "jsx": "react", + "jsx": "react-jsx", "module": "esnext", "moduleResolution": "node", "noUncheckedIndexedAccess": true,