react-google-font-loader
Advanced tools
Comparing version 1.0.2-alpha.2 to 1.0.2-aplha.1
@@ -45,5 +45,5 @@ 'use strict'; | ||
var family = font.font.replace(/ +/g, '+'); | ||
var weights = font.weights.join(','); | ||
var weights = (font.weights || []).join(','); | ||
acc.push(family + ':' + weights); | ||
acc.push(family + (weights && ':' + weights)); | ||
@@ -96,19 +96,7 @@ return acc; | ||
fonts: _propTypes2.default.arrayOf(_propTypes2.default.shape({ | ||
font: _propTypes2.default.string, | ||
font: _propTypes2.default.string.isRequired, | ||
weights: _propTypes2.default.arrayOf(_propTypes2.default.number) | ||
})).isRequired | ||
}; | ||
; | ||
/* | ||
GoogleFontLoader.propTypes = { | ||
fonts: PropTypes.arrayOf( | ||
PropTypes.shape({ | ||
font: PropTypes.string, | ||
weights: PropTypes.arrayOf(PropTypes.number), | ||
}), | ||
), | ||
}; | ||
*/ | ||
exports.default = GoogleFontLoader; |
{ | ||
"name": "react-google-font-loader", | ||
"version": "1.0.2-alpha.2", | ||
"version": "1.0.2-aplha.1", | ||
"description": "Simple React component to load Google Fonts.", | ||
@@ -13,5 +13,2 @@ "main": "build/index.js", | ||
}, | ||
"dependencies": { | ||
"prop-types": "^15.6.2" | ||
}, | ||
"peerDependencies": { | ||
@@ -30,3 +27,6 @@ "react": "^16.6.3", | ||
"webpack-cli": "^3.1.2" | ||
}, | ||
"dependencies": { | ||
"prop-types": "^15.6.2" | ||
} | ||
} |
6788
75