Comparing version 0.0.8 to 0.0.9
@@ -26,3 +26,3 @@ 'use strict'; | ||
function getClassNameFromOptions(options) { | ||
var fromProps, fromClassNames; | ||
var fromProps, fromClassNames, fallback; | ||
if (typeof options === 'string') { | ||
@@ -35,3 +35,4 @@ return { | ||
fromClassNames = options.classNameFromClassNames; | ||
if (!fromProps && !fromClassNames) { | ||
fallback = options.fallbackClassName; | ||
if (!fromProps && !fromClassNames && !fallback) { | ||
return; | ||
@@ -41,3 +42,3 @@ } | ||
getClassName: function getClassName(component, classNames) { | ||
return fromProps && component.props[fromProps] || classNames[fromClassNames]; | ||
return fromProps && component.props[fromProps] || classNames[fromClassNames] || fallback; | ||
} | ||
@@ -44,0 +45,0 @@ }; |
@@ -37,3 +37,3 @@ 'use strict'; | ||
function getClassNameFromOptions(options) { | ||
var fromProps, fromClassNames; | ||
var fromProps, fromClassNames, fallback; | ||
if (typeof options === 'string') { | ||
@@ -46,3 +46,4 @@ return { | ||
fromClassNames = options.classNameFromClassNames; | ||
if (!fromProps && !fromClassNames) { | ||
fallback = options.fallbackClassName; | ||
if (!fromProps && !fromClassNames && !fallback) { | ||
return; | ||
@@ -52,3 +53,3 @@ } | ||
getClassName: function getClassName(component, classNames) { | ||
return fromProps && component.props[fromProps] || classNames[fromClassNames]; | ||
return fromProps && component.props[fromProps] || classNames[fromClassNames] || fallback; | ||
} | ||
@@ -55,0 +56,0 @@ }; |
{ | ||
"name": "txregions", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "A React text input component with invalid character highlighting and URL, email, and number presets.", | ||
@@ -5,0 +5,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
218798
3981