Skip to content

Commit

Permalink
fix: fix all strings allowed in fontWeight in Font.register (#2310)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj authored May 31, 2023
1 parent 2e724df commit a25dbcb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/cyan-keys-sing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@react-pdf/types': patch
---

Fixed all strings allowed in `fontWeight` in `Font.register`
4 changes: 2 additions & 2 deletions packages/types/font.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ interface SingleLoad {
family: string;
src: string;
fontStyle?: string;
fontWeight?: string | number;
fontWeight?: FontWeight;
[key: string]: any;
}

Expand All @@ -70,7 +70,7 @@ interface BulkLoad {
fonts: {
src: string;
fontStyle?: string;
fontWeight?: string | number;
fontWeight?: FontWeight;
[key: string]: any;
}[];
}
Expand Down

0 comments on commit a25dbcb

Please sign in to comment.