pcln-design-system
Advanced tools
Comparing version 1.0.0-67 to 1.0.0-68
@@ -147,5 +147,3 @@ 'use strict'; | ||
_react2.default.Children.forEach(children, function (child, index) { | ||
if (!child) { | ||
return; | ||
} | ||
if (!child) return; | ||
@@ -155,23 +153,23 @@ var type = child.type, | ||
if (type === _Label2.default) { | ||
LabelChild = child; | ||
switch (type) { | ||
case _Label2.default: | ||
LabelChild = child; | ||
break; | ||
case _Input2.default: | ||
case _Select2.default: | ||
position = index; | ||
FieldChild = child; | ||
fieldId = props.id; | ||
// For aria-label when Label child is not rendered | ||
fieldPlaceholder = props.placeholder; | ||
break; | ||
case _Icon2.default: | ||
if (position < 0) { | ||
BeforeIcon = child; | ||
iconAdjustment = props.size - 24; | ||
} else { | ||
AfterIcon = child; | ||
} | ||
break; | ||
} | ||
if (type === _Input2.default || type === _Select2.default) { | ||
position = index; | ||
FieldChild = child; | ||
fieldId = props.id; | ||
// For aria-label when Label child is not rendered | ||
fieldPlaceholder = props.placeholder; | ||
} | ||
if (type === _Icon2.default) { | ||
if (position < 0) { | ||
BeforeIcon = child; | ||
iconAdjustment = props.size - 24; | ||
} else { | ||
AfterIcon = child; | ||
} | ||
} | ||
}); | ||
@@ -178,0 +176,0 @@ |
{ | ||
"name": "pcln-design-system", | ||
"version": "1.0.0-67", | ||
"version": "1.0.0-68", | ||
"description": "Priceline Design System", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
232488
2833