solidjs / solid

A declarative, efficient, and flexible JavaScript library for building user interfaces.
https://solidjs.com
MIT License
31.91k stars 909 forks source link

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

Open thep0y opened 6 months ago

thep0y commented 6 months ago

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

Additional context

No response

ryansolid commented 6 months ago

Accidentally closed this one.

dayvster commented 1 month ago

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