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

Support SVG image element #1428

Closed
sclydon opened this issue Jul 27, 2021 · 4 comments
Closed

Support SVG image element #1428

sclydon opened this issue Jul 27, 2021 · 4 comments

Comments

@sclydon
Copy link

sclydon commented Jul 27, 2021

Supporting the SVG image element would be really useful for many use cases. The ability to embed images directly into SVG is really powerful.

@jeetiss
Copy link
Collaborator

jeetiss commented Oct 16, 2021

@seanlydon it works in v2, you just need to add addition props to image

example with SVG image element

@adrianbartnik
Copy link

Hi @jeetiss and @seanlydon, I just started with react, so I might be doing something wrong, but the example that you posted doesn't work for me, see the screenshot below. Typescript complains that the Image-Component doesn't take x as input. Could Typescript be the reason? I also couldn't find neither the x nor y attribute on the ImageProps when I follow the definitions in VS Code. Do you see, where the issue is?
Thank you
image

@adrianbartnik
Copy link

As a follow-up, I have got this working by setting inserting // @ts-ignore within the component and it seems to do the trick.

@jeetiss
Copy link
Collaborator

jeetiss commented Nov 15, 2021

@adrianbartnik could you improve the image types to support this case?

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

No branches or pull requests

4 participants