Skip to content

Commit aec3b46

Browse files
committed
fix diegomura#3012: PDFDownloadLinkProps Type Error
1 parent 7b678cf commit aec3b46

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/renderer/index.d.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -496,11 +496,14 @@ declare namespace ReactPDF {
496496
export class PDFViewer extends React.Component<PDFViewerProps> {}
497497

498498
interface PDFDownloadLinkProps
499-
extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {
499+
extends Omit<
500+
React.AnchorHTMLAttributes<HTMLAnchorElement>,
501+
'href' | 'children'
502+
> {
500503
/** PDF filename. Alias for anchor tag `download` attribute. */
501504
fileName?: string;
502505
document: React.ReactElement<DocumentProps>;
503-
children?: React.ReactNode | React.ReactElement<BlobProviderParams>;
506+
children?: React.ReactNode | React.FC<BlobProviderParams>;
504507
onClick?: React.AnchorHTMLAttributes<HTMLAnchorElement>['onClick'] &
505508
((
506509
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>,

0 commit comments

Comments
 (0)