Commit 9501881
Add a module with types for SVG elements (#87)
* Add types for SVG elements
Adds a new module, React.Basic.DOM.SVG, with types for SVG
elements. The types are generated based on the svg-element-attribute npm
package. There were a few hyphenated elements (e.g. <font-face>) that
looked like they might be troublesome with React. I couldn't find any
information on whether React supports these, but they turned out to
be deprecated according to MDN, so in the end I omitted all the
deprecated elements.
* Fix the Props_svg type in React.Basic.DOM
The Props_svg type was generated from react-html-attributes, but
react-html-attributes intentionally lists the wrong set of attributes
for the svg tag:
"One more note: all SVG element attributes supported by React are under
the 'svg' key to avoid too many duplicated values and unnecessary file
size." (https://www.npmjs.com/package/react-html-attributes)
The attributes for Props_svg are now taken from svg-element-attributes
instead, so the Props_svg in React.Basic.DOM is now the same as the
Props_svg in React.Basic.DOM.SVG apart from using the HTML shared props
instead of the SVG ones.
* Fix SharedSVGProps
Add the missing row type parameter
* Remove redundant import
* Add 'style' to SharedSVGProps with correct type1 parent d70820f commit 9501881
File tree
6 files changed
+4802
-178
lines changed- codegen
- src/React/Basic/DOM
6 files changed
+4802
-178
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | | - | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
32 | 72 | | |
33 | 73 | | |
34 | 74 | | |
35 | 75 | | |
36 | 76 | | |
37 | 77 | | |
38 | 78 | | |
39 | | - | |
40 | | - | |
| 79 | + | |
| 80 | + | |
41 | 81 | | |
42 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
43 | 86 | | |
44 | 87 | | |
45 | 88 | | |
46 | 89 | | |
47 | 90 | | |
48 | 91 | | |
49 | 92 | | |
50 | | - | |
| 93 | + | |
51 | 94 | | |
52 | 95 | | |
53 | 96 | | |
| |||
59 | 102 | | |
60 | 103 | | |
61 | 104 | | |
62 | | - | |
63 | | - | |
| 105 | + | |
64 | 106 | | |
65 | 107 | | |
66 | | - | |
67 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
68 | 115 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
0 commit comments