Skip to content

Commit

Permalink
fix #3012: PDFDownloadLinkProps Type Error
Browse files Browse the repository at this point in the history
  • Loading branch information
islam-kamel authored and islam-femtosec committed Dec 29, 2024
1 parent 7b678cf commit b31ff56
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/renderer/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,14 @@ declare namespace ReactPDF {
export class PDFViewer extends React.Component<PDFViewerProps> {}

interface PDFDownloadLinkProps
extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {
extends Omit<
React.AnchorHTMLAttributes<HTMLAnchorElement>,
'href' | 'children'
> {
/** PDF filename. Alias for anchor tag `download` attribute. */
fileName?: string;
document: React.ReactElement<DocumentProps>;
children?: React.ReactNode | React.ReactElement<BlobProviderParams>;
children?: React.ReactNode | React.FC<BlobProviderParams>;
onClick?: React.AnchorHTMLAttributes<HTMLAnchorElement>['onClick'] &
((
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>,
Expand Down

0 comments on commit b31ff56

Please sign in to comment.