Skip to content

Commit

Permalink
fix: props unnecessarily required in LinearGradient and RadialGradien…
Browse files Browse the repository at this point in the history
…t in TypeScript (#2519)

fix: fix props unnecessarily required in LinearGradient and RadialGradient in TypeScript
  • Loading branch information
wojtekmaj committed Jan 19, 2024
1 parent 214207b commit cf73180
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/pretty-moons-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@react-pdf/renderer': patch
---

Fix props unnecessarily required in LinearGradient and RadialGradient in TypeScript
18 changes: 9 additions & 9 deletions packages/renderer/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,10 @@ declare namespace ReactPDF {

interface LinearGradientProps {
id: string;
x1: string | number;
x2: string | number;
y1: string | number;
y2: string | number;
x1?: string | number;
x2?: string | number;
y1?: string | number;
y2?: string | number;
}

/**
Expand All @@ -416,11 +416,11 @@ declare namespace ReactPDF {

interface RadialGradientProps {
id: string;
cx: string | number;
cy: string | number;
fr: string | number;
fx: string | number;
fy: string | number;
cx?: string | number;
cy?: string | number;
fr?: string | number;
fx?: string | number;
fy?: string | number;
}

/**
Expand Down

0 comments on commit cf73180

Please sign in to comment.