Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[React 19] transformOrigin is Missing From Type SVGAttributes. #29134

Open
daniel-nagy opened this issue May 17, 2024 · 0 comments
Open

[React 19] transformOrigin is Missing From Type SVGAttributes. #29134

daniel-nagy opened this issue May 17, 2024 · 0 comments
Labels

Comments

@daniel-nagy
Copy link

Summary

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.

I was going to open a PR to add this but the types package for React 19 appears to be private.

Workaround

declare module "react" {
  interface SVGAttributes<T> {
    transformOrigin?: string | undefined;
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant