diff --git a/.changeset/pretty-moons-hang.md b/.changeset/pretty-moons-hang.md new file mode 100644 index 000000000..3f846a9c3 --- /dev/null +++ b/.changeset/pretty-moons-hang.md @@ -0,0 +1,5 @@ +--- +'@react-pdf/renderer': patch +--- + +Fix props unnecessarily required in LinearGradient and RadialGradient in TypeScript diff --git a/packages/renderer/index.d.ts b/packages/renderer/index.d.ts index 5e5a3539d..54618d476 100644 --- a/packages/renderer/index.d.ts +++ b/packages/renderer/index.d.ts @@ -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; } /** @@ -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; } /**