Skip to content

Commit b6501b3

Browse files
feat(react-property): add module that exports SVG DOM attribute map
1 parent 5f72f00 commit b6501b3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var attributeToProperty = require('../../lib/svg/attribute-to-property');
2+
var attributes = require('../../lib/svg/attributes');
3+
4+
var attributeMap = {};
5+
var attributeName;
6+
var propertyName;
7+
8+
for (var i = 0, len = attributes.length; i < len; i++) {
9+
attributeName = attributes[i];
10+
propertyName = attributeToProperty[attributeName] || attributeName;
11+
attributeMap[attributeName] = { propertyName: propertyName };
12+
}
13+
14+
module.exports = attributeMap;

0 commit comments

Comments
 (0)