font-picker-react
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -200,3 +200,3 @@ 'use strict'; | ||
id: 'font-picker', | ||
title: this.props.error ? 'Error trying to fetch the list of available fonts' : '' | ||
title: this.props.loadingStatus === 'error' ? 'Error trying to fetch the list of available fonts' : '' | ||
}, | ||
@@ -218,9 +218,5 @@ React__default.createElement( | ||
), | ||
React__default.createElement( | ||
'p', | ||
null, | ||
this.props.error ? '⚠' : '▾' | ||
) | ||
React__default.createElement('div', { className: 'dropdown-icon ' + this.props.loadingStatus }) | ||
), | ||
this.props.error || fontList | ||
this.props.loadingStatus === 'finished' && fontList | ||
); | ||
@@ -267,4 +263,4 @@ } | ||
}, | ||
error: false, // indicates whether fetching font list has been successful | ||
fontList: [] | ||
fontList: [], | ||
loadingStatus: 'loading' | ||
}; | ||
@@ -279,3 +275,4 @@ | ||
activeFont: _this.fontHandler.activeFont, | ||
fontList: _this.fontHandler.fonts | ||
fontList: _this.fontHandler.fonts, | ||
loadingStatus: 'finished' | ||
}); | ||
@@ -286,3 +283,3 @@ }).catch(function (err) { | ||
_this.setState({ | ||
error: true | ||
loadingStatus: 'error' | ||
}); | ||
@@ -331,4 +328,4 @@ }); | ||
}, | ||
error: this.state.error, | ||
fontList: this.state.fontList, | ||
loadingStatus: this.state.loadingStatus, | ||
selectFont: this.selectFont | ||
@@ -335,0 +332,0 @@ }); |
{ | ||
"name": "font-picker-react", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Font picker component for previewing, selecting, and downloading Google Fonts", | ||
@@ -16,3 +16,3 @@ "keywords": [ | ||
"repository": "github:smeuli/font-picker-react", | ||
"homepage": "https://samuelmeuli.com/font-picker", | ||
"homepage": "https://smeuli.github.io/font-picker", | ||
"license": "MIT", | ||
@@ -28,3 +28,3 @@ "scripts": { | ||
"dependencies": { | ||
"font-picker": "^1.0.0" | ||
"font-picker": "^1.1.0" | ||
}, | ||
@@ -31,0 +31,0 @@ "peerDependencies": { |
@@ -11,3 +11,3 @@ # Font Picker for React | ||
→ **[Demo](https://samuelmeuli.com/font-picker)** | ||
→ **[Demo](https://smeuli.github.io/font-picker)** | ||
@@ -14,0 +14,0 @@ _This is the React component for the [**Font Picker**](https://github.com/smeuli/font-picker) 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
No website
QualityPackage does not have a website.
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
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
14988
272
Updatedfont-picker@^1.1.0