Socket
Socket
Sign inDemoInstall

font-picker-react

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

font-picker-react - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

29

lib/FontPicker.js

@@ -199,3 +199,3 @@ 'use strict';

{
id: 'font-picker',
id: 'font-picker' + this.props.name,
title: this.props.loadingStatus === 'error' ? 'Error trying to fetch the list of available fonts' : ''

@@ -208,4 +208,3 @@ },

tabIndex: '0',
id: 'dropdown-button',
className: this.state.expanded ? 'expanded' : '',
className: 'dropdown-button ' + (this.state.expanded ? 'expanded' : ''),
onClick: this.toggleExpanded,

@@ -228,25 +227,2 @@ onKeyPress: this.toggleExpanded

/**
* 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[]} 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) {

@@ -328,2 +304,3 @@ inherits(FontPicker, _Component);

loadingStatus: this.state.loadingStatus,
name: this.fontHandler.name,
selectFont: this.selectFont

@@ -330,0 +307,0 @@ });

2

package.json
{
"name": "font-picker-react",
"version": "1.1.0",
"version": "1.2.0",
"description": "Font picker component for previewing, selecting, and downloading Google Fonts",

@@ -5,0 +5,0 @@ "keywords": [

@@ -59,2 +59,3 @@ # Font Picker for React

* **`options`**: Object with additional (optional) parameters:
* **`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; e.g. if `{ name: 'main' }`, then use `#font-picker-main` and `.apply-font-main`
* **`families`**: If only specific fonts shall appear in the list, specify their names in an array (default: all font families)

@@ -61,0 +62,0 @@ * **`categories`**: Array of font categories – possible values: `'sans-serif', 'serif', 'display', handwriting', 'monospace'` (default: all categories)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc