npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-entypo-icons

v1.4.1

Published

Entypo Icon React Component which outputs inline-SVGs

Downloads

33,543

Readme

Entypo Icons - React Component

A React component for the Entypo SVG icon library.

React-Entypo-Icons sets up all the icons of the Entypo SVG library to be used as components which will render as inline SVGs. Both the main set and the Social Extension are included. This component is designed to use Entypo SVGs as inline icons and are set with default inline styling to be the same size as the base text in the container they're placed. No CSS is supplied by 'react-entypo-icons'; therefore, any other styles will have to be passed to the component or set by style declarations elsewhere.

The SVGs use the same names as the files in the Entypo SVG library, but camel-cased instead of hyphens, and any special characters removed.

Install

npm install --save react-entypo-icons

Usage

Just import each icon you want to reference (and React, of course).

var React = require('react');
var {EntypoArrowBoldRight, EntypoCalculator} = require('react-entypo-icons');

or, import the ES6 way...

import React from 'react';
import {EntypoArrowBoldRight, EntypoCalculator} from 'react-entypo-icons';

...or, reference the icon by file. Initial path is 'react-entypo-icons/lib/entypo/[ICONNAME]' where ICONNAME is the name of the icon (PascalCased).[1]

import React from 'react';
import EntypoArrowBoldRight from 'react-entypo-icons/lib/entypo/ArrowBoldRight';
import EntypoCalculator from 'react-entypo-icons/lib/entypo/Calculator';

...then reference like any other component: <EntypoArrowBoldRight />, <EntypoCalculator/>.

Examples:

<Button>This Way! <EntypoArrowBoldRight/></Button>

<div><EntypoArrowBoldRight style/></div>

<Button><EntypoCalculator className="my-calc-icon" valign style{{'fill':'white','box-shadow':'0 0 5px rgba(0,0,0,.8)'}}/></Button>

| Param | Type | Default | Description | | --- | --- | --- | --- | | [style] | String | | Additional inline styles, adds to: display:inline-block;height:1em;width:1em; user-select:none;fill:currentColor; | | [valign] | String | Boolean | 'text-top' | Adds vertical-align:[valign] to the standard styles (above, see [2]). If false, does not output 'vertical-align:...' to style attribute.If true or used without a value, will set to vertical-align:middle. | | [className] | String | | An extra set of CSS classes to add to the component. Default is "entypo-icon entypo--[ICONNAME]" | | [viewBox] | String | '0 0 20 20' | Default viewbox |

Other attributes can be passed but have no defaults. Examples include data- or id attributes.

[1] - This will reduce the final package size. Using the object notation in the above examples brings with them all the icons in that object (all 411 of them). By referencing with the path name to the icon specifically means that only those specified will be in the final build file. The downside is notation; however, as it's much easier to use the object notation as noted above to reference the icons and leaves fewer lines of code in your development files.

[2] - The default of "vertical-align:text-top" is due to the way the icons are created and being presented. Since the icons are usually used inline with text, forcing alignment to base off text-top allows for better vertical spacing. However, if an icon is used alone, setting vertical-alignment to "middle" works better visually since there's no text adjacent to provide any contextual vertical spacing issues.


Attribution

CC BY-SA 4.0 @ Daniel Bruce