solid icon indicating copy to clipboard operation
solid copied to clipboard

Property 'xmlns:xlink' does not exist on type 'SvgSVGAttributes<SVGSVGElement>'.

Open thep0y opened this issue 2 years ago • 2 comments

Describe the bug

SVG supports the definition of namespace prefixes, but these attributes are missing in SolidJS, as indicated by the error in the title.

Your Example Website or App

nope

Steps to Reproduce the Bug or Issue

const Icon = () => (
  <svg
    viewBox="0 0 400 400"
    xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink"  // <= Property 'xmlns:xlink' does not exist on type 'SvgSVGAttributes<SVGSVGElement>'. 
  >
  // ...
  </svg><
)

Expected behavior

https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course#declaring_namespace_prefixes

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Firefox
  • Version: 122

Additional context

No response

thep0y avatar Jan 26 '24 13:01 thep0y

Accidentally closed this one.

ryansolid avatar Feb 14 '24 20:02 ryansolid

Valid typescript types can not contain a colon symbol : so it would either have to be xmlnsXlink or just xlink

dayvster avatar Jun 30 '24 12:06 dayvster