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

TS Definitions for SVG rendererSettings missing from type AnimationConfig #89

Open
Loque- opened this issue Apr 25, 2023 · 1 comment
Open

Comments

@Loque-
Copy link

Loque- commented Apr 25, 2023

Describe the bug
Typescript is potentially missing some definitions for rendererSettings

To Reproduce

  1. Create a react typescript component and use Lottie from lottie-react
  2. Add width and height properties to rendererSettings
<Lottie
  rendererSettings={{
    preserveAspectRatio: 'xMidYMid slice',
    width: '100%',
    height: '100%',
  }}
/>
  1. Observe that the properties render on the SVG component (thank you, that is awesome)
  2. Observe TS complaining that the props don't exist on type AnimationConfig

Expected behavior
TS doesn't complain and we get auto-complete for SVG render props

Additional context
I might be missing something as I have only just started using the lib, seems great also btw, thank you and great work 🙌

@Loque-
Copy link
Author

Loque- commented Apr 25, 2023

Hmm I think I am missing something, as I see some other attributes under rendererSettings SVGRendererConfig

My specific issue is I have a .json lottie file rendering with inline width and height properties that I would like to override/remove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant