diff --git a/packages/react-pdf/src/Outline.tsx b/packages/react-pdf/src/Outline.tsx index 9f20dccb..8480b675 100644 --- a/packages/react-pdf/src/Outline.tsx +++ b/packages/react-pdf/src/Outline.tsx @@ -64,7 +64,7 @@ export type OutlineProps = { * * Should be placed inside ``. Alternatively, it can have `pdf` prop passed, which can be obtained from ``'s `onLoadSuccess` callback function. */ -const Outline: React.FC = function Outline(props) { +export default function Outline(props: OutlineProps) { const documentContext = useDocumentContext(); const mergedProps = { ...documentContext, ...props }; @@ -200,6 +200,4 @@ const Outline: React.FC = function Outline(props) { {renderOutline()} ); -}; - -export default Outline; +} diff --git a/packages/react-pdf/src/Page.tsx b/packages/react-pdf/src/Page.tsx index 4c0921f4..0cee561a 100644 --- a/packages/react-pdf/src/Page.tsx +++ b/packages/react-pdf/src/Page.tsx @@ -303,7 +303,7 @@ export type PageProps = { * * Should be placed inside ``. Alternatively, it can have `pdf` prop passed, which can be obtained from ``'s `onLoadSuccess` callback function, however some advanced functions like linking between pages inside a document may not be working correctly. */ -const Page: React.FC = function Page(props) { +export default function Page(props: PageProps) { const documentContext = useDocumentContext(); const mergedProps = { ...documentContext, ...props }; @@ -644,6 +644,4 @@ const Page: React.FC = function Page(props) { {renderContent()} ); -}; - -export default Page; +} diff --git a/packages/react-pdf/src/Thumbnail.tsx b/packages/react-pdf/src/Thumbnail.tsx index 45831989..e09a92fa 100644 --- a/packages/react-pdf/src/Thumbnail.tsx +++ b/packages/react-pdf/src/Thumbnail.tsx @@ -48,7 +48,7 @@ export type ThumbnailProps = Omit< * * Should be placed inside ``. Alternatively, it can have `pdf` prop passed, which can be obtained from ``'s `onLoadSuccess` callback function. */ -const Thumbnail: React.FC = function Thumbnail(props) { +export default function Thumbnail(props: ThumbnailProps) { const documentContext = useDocumentContext(); const mergedProps = { ...documentContext, ...props }; @@ -111,6 +111,4 @@ const Thumbnail: React.FC = function Thumbnail(props) { /> ); -}; - -export default Thumbnail; +}