Open daniel-nagy opened 2 weeks ago
In React 18 the following code worked with out error.
<svg transform-origin="..." />
Since React 19, this will error. The required syntax is now
<svg transformOrigin="..." />
However, transformOrigin is missing from SVGAttributes, so this results in a type error.
transformOrigin
SVGAttributes
I was going to open a PR to add this but the types package for React 19 appears to be private.
declare module "react" { interface SVGAttributes<T> { transformOrigin?: string | undefined; } }
Summary
In React 18 the following code worked with out error.
Since React 19, this will error. The required syntax is now
However,
transformOrigin
is missing fromSVGAttributes
, so this results in a type error.I was going to open a PR to add this but the types package for React 19 appears to be private.
Workaround