Skip to content

Commit 15dda24

Browse files
committed
rebuild dist
1 parent 5fd5ce0 commit 15dda24

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

Diff for: dist/converter.js

+6-9
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ var svgObjectMap = {
4040
function convert(createElement, element) {
4141
var extraProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
4242

43-
// console.log(`DEBUG: in convert. element.tag = ${element.tag} and extraProps = `, extraProps)
44-
// console.log(`DEBUG: in convert. element.attributes = `, element.attributes)
4543
if (typeof element === 'string') {
4644
return element;
4745
}
@@ -56,22 +54,22 @@ function convert(createElement, element) {
5654
case 'class':
5755
case 'role':
5856
case 'style': // TODO: when react-native-svg supports the style prop, there may be a better way to do this.
59-
// In the meantime, we're manually peeling off specific style properties, namely color, and passing them down
60-
// to children as a fill prop
57+
// In the meantime, (below) we'll manually peel off any color property passed in via the "style" prop
58+
// and assign it as the value of the "fill" attribute.
6159
// See: https://github.com/react-native-community/react-native-svg/commit/e7d0eb6df676d4f63f9eba7c0cf5ddd6c4c85fbe
6260

6361
case 'xmlns':
6462
delete element.attributes[key];
6563
break;
6664

6765
case 'fill':
68-
// TODO: probably want to keep fill, but just translate 'currentColor' to 'black'
69-
// When react-native-svg supports currentColor, pass it through
66+
// TODO: When react-native-svg supports currentColor, pass it through
67+
// In the meantime, just translate 'currentColor' to 'black'
68+
// See: https://github.com/react-native-community/react-native-svg/commit/1827b918833efdaa25cfc1a76df2164cb2bcdd2b
7069
acc.attrs[key] = val === 'currentColor' ? 'black' : val;
7170
break;
7271

7372
default:
74-
// console.log(`DEBUG: for element tag <${element.tag}>, setting prop key=val to ${key}=`, val)
7573
if (key.indexOf('aria-') === 0 || key.indexOf('data-') === 0) {
7674
delete element.attributes[key];
7775
} else {
@@ -93,8 +91,7 @@ function convert(createElement, element) {
9391

9492
if (extraProps.style && extraProps.style.color) {
9593
modifiedExtraProps['fill'] = extraProps.style.color;
96-
} // console.log(`DEBUG: while creating element with tag=${element.tag}, we have extraProps: `, extraProps )
97-
94+
}
9895

9996
return createElement.apply(void 0, [svgObjectMap[element.tag], _objectSpread({}, mixins.attrs, modifiedExtraProps)].concat(_toConsumableArray(children)));
10097
}

0 commit comments

Comments
 (0)