Skip to content

Type error when passing canvas or html to renderer prop #127

@watchiswatch

Description

@watchiswatch

Hi:)

Describe the bug

When I pass 'canvas' to the renderer prop, TypeScript raises a type error:

The expected type comes from property 'renderer' which is declared here on type 'IntrinsicAttributes & Omit<AnimationConfigWithData<"svg">, "container" | "animationData"> & { animationData: unknown; lottieRef?: LottieRef | undefined; ... 9 more ...; onDestroy?: AnimationEventHandler | ... 1 more ... | undefined; } & Omit<...> & { ...; }'

To Reproduce

  1. Invoke the Lottie Component
  2. Pass 'canvas' to renderer prop
  3. Type error occurs

Expected behavior

The 'renderer' prop needs to accept 'canvas', 'html' also.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions