From 0ad113f44d60dc63a5ca3e38a81f6b5bb95412c8 Mon Sep 17 00:00:00 2001 From: iBobo Date: Fri, 3 Nov 2023 12:26:12 +0100 Subject: [PATCH 1/2] Add most common svg attributes --- src/dom/attributes/ReactAttributes.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/dom/attributes/ReactAttributes.js b/src/dom/attributes/ReactAttributes.js index cd86919..acda92a 100644 --- a/src/dom/attributes/ReactAttributes.js +++ b/src/dom/attributes/ReactAttributes.js @@ -135,6 +135,32 @@ export default { width: 'width', wmode: 'wmode', wrap: 'wrap', + /** + * SVG attributes + */ + 'clip-path': 'clipPath', + 'clip-rule': 'clipRule', + 'fill-opacity': 'fillOpacity', + 'fill-rule': 'fillRule', + 'font-family': 'fontFamily', + 'font-size': 'fontSize', + 'font-size-adjust': 'fontSizeAdjust', + 'font-stretch': 'fontStretch', + 'font-style': 'fontStyle', + 'font-variant': 'fontVariant', + 'font-weight': 'fontWeight', + 'stop-color': 'stopColor', + 'stop-opacity': 'stopOpacity', + 'stroke-dasharray': 'strokeDasharray', + 'stroke-dashoffset': 'strokeDashoffset', + 'stroke-linecap': 'strokeLinecap', + 'stroke-linejoin': 'strokeLinejoin', + 'stroke-miterlimit': 'strokeMiterlimit', + 'stroke-width': 'strokeWidth', + 'stroke-opacity': 'strokeOpacity', + 'xlink:href': 'xlinkHref', + 'xmlns:xlink': 'xmlnsXlink', + 'xml:space': 'xmlSpace', /** * RDFa Properties */ From 1a07963ee85aad3fb6f58444d2bbd7faff69e8b2 Mon Sep 17 00:00:00 2001 From: iBobo Date: Fri, 3 Nov 2023 12:33:18 +0100 Subject: [PATCH 2/2] Missing viewBox --- src/dom/attributes/ReactAttributes.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dom/attributes/ReactAttributes.js b/src/dom/attributes/ReactAttributes.js index acda92a..cfadd16 100644 --- a/src/dom/attributes/ReactAttributes.js +++ b/src/dom/attributes/ReactAttributes.js @@ -158,6 +158,7 @@ export default { 'stroke-miterlimit': 'strokeMiterlimit', 'stroke-width': 'strokeWidth', 'stroke-opacity': 'strokeOpacity', + viewbox: 'viewBox', 'xlink:href': 'xlinkHref', 'xmlns:xlink': 'xmlnsXlink', 'xml:space': 'xmlSpace',