font-picker-react
Advanced tools
Comparing version 1.2.1 to 1.3.0
@@ -33,10 +33,2 @@ 'use strict'; | ||
var inherits = function (subClass, superClass) { | ||
@@ -58,12 +50,2 @@ if (typeof superClass !== "function" && superClass !== null) { | ||
var possibleConstructorReturn = function (self, call) { | ||
@@ -227,2 +209,29 @@ if (!self) { | ||
/** | ||
* Font picker container component | ||
* @prop {string} apiKey (required) - Google API key (can be generated at | ||
* https://developers.google.com/fonts/docs/developer_api) | ||
* @prop {string} defaultFont - Font that is selected on initialization (default: 'Open Sans') | ||
* @prop {Object} options - Object with additional (optional) parameters: | ||
* @prop {string} name - If you have multiple font pickers on your site, you need to give them | ||
* unique names (which may only consist of letters and digits). These names must also be | ||
* appended to the font picker's ID and the .apply-font class name. | ||
* Example: if { name: 'main' }, then use #font-picker-main and .apply-font-main | ||
* @prop {string[]} families - If only specific fonts shall appear in the list, specify their | ||
* names in an array | ||
* @prop {string[]} categories - Array of font categories | ||
* Possible values: 'sans-serif', 'serif', 'display', 'handwriting', 'monospace' (default: | ||
* all categories) | ||
* @prop {string[]} variants - Array of variants which the fonts must include and which will be | ||
* downloaded; the first variant in the array will become the default variant (and will be | ||
* used in the font picker and the .apply-font class) | ||
* Example: ['regular', 'italic', '700', '700italic'] (default: ['regular']) | ||
* @prop {number} limit - Maximum number of fonts to be displayed in the list (the least popular | ||
* fonts will be omitted; default: 100) | ||
* @prop {string} sort - Sorting attribute for the font list | ||
* Possible values: 'alphabetical' (default), 'popularity' | ||
* @prop {function} onChange - Function which is executed whenever the user changes the active | ||
* font and its stylesheet finishes downloading | ||
*/ | ||
var FontPicker = function (_Component) { | ||
@@ -229,0 +238,0 @@ inherits(FontPicker, _Component); |
{ | ||
"name": "font-picker-react", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "Font picker component for previewing, selecting, and downloading Google Fonts", | ||
@@ -22,3 +22,3 @@ "keywords": [ | ||
"storybook": "start-storybook -p 6006", | ||
"lint": "eslint --ext .js src stories", | ||
"lint": "eslint .", | ||
"precommit": "npm run lint", | ||
@@ -28,3 +28,3 @@ "prepush": "npm run lint" | ||
"dependencies": { | ||
"font-picker": "^1.2.1" | ||
"font-picker": "^1.3.0" | ||
}, | ||
@@ -35,6 +35,6 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@storybook/addon-actions": "^3.3.10", | ||
"@storybook/addon-links": "^3.3.10", | ||
"@storybook/addons": "^3.3.10", | ||
"@storybook/react": "^3.3.10", | ||
"@storybook/addon-actions": "^3.3.15", | ||
"@storybook/addon-links": "^3.3.15", | ||
"@storybook/addons": "^3.3.15", | ||
"@storybook/react": "^3.3.15", | ||
"babel-core": "^6.26.0", | ||
@@ -44,11 +44,11 @@ "babel-plugin-external-helpers": "^6.22.0", | ||
"babel-preset-react": "^6.24.1", | ||
"eslint": "^4.15.0", | ||
"eslint": "^4.19.1", | ||
"eslint-config-airbnb": "^16.1.0", | ||
"eslint-plugin-import": "^2.8.0", | ||
"eslint-plugin-import": "^2.9.0", | ||
"eslint-plugin-jsx-a11y": "^6.0.2", | ||
"eslint-plugin-react": "^7.5.1", | ||
"eslint-plugin-react": "^7.7.0", | ||
"husky": "^0.14.3", | ||
"react": "^16.0.0", | ||
"react-dom": "^16.0.0", | ||
"rollup": "^0.55.1", | ||
"rollup": "^0.57.1", | ||
"rollup-plugin-babel": "^3.0.3" | ||
@@ -55,0 +55,0 @@ }, |
@@ -16,3 +16,3 @@ # Font Picker for React | ||
<p align="center"> | ||
<img src=".github/demo.gif" width=800 alt="Demo"> | ||
<img src=".github/demo.gif" width=700 alt="Demo"> | ||
</p> | ||
@@ -74,2 +74,2 @@ | ||
* `npm start` to generate the library bundle using [Rollup](https://github.com/rollup/rollup) (in the `lib` directory) | ||
* See the font picker in action using [Storybook](https://github.com/storybooks/storybook): `npm run storybook` | ||
* See the font picker in action using [Storybook](https://github.com/storybooks/storybook): `npm run storybook` |
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
15673
276
74
Updatedfont-picker@^1.3.0