Skip to content

souce on image element gives a Typescript error #106

@tmyroadctfig

Description

@tmyroadctfig

I'm getting:

TS2322: Type '{ source: string; }' is not assignable to type 'SVGProps<SVGImageElement>'.
  Property 'source' does not exist on type 'SVGProps<SVGImageElement>'.

on something like:

  return (
    <div>
      <image source='https://picsum.photos/200' />
    </div>
  )

Also it seems unhappy about objectFit: TS2322: Type '"fit"' is not assignable to type 'ObjectFit'.

<image style={{ height: 300, objectFit: 'fit' }} source='https://picsum.photos/200' />

Metadata

Metadata

Assignees

No one assigned

    Labels

    typesAn issue related to Typescript types & generator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions