Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@iconify/tailwind

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iconify/tailwind - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

12

dist/plugin.d.ts

@@ -68,5 +68,15 @@ import { Config } from 'tailwindcss/types/config';

export declare interface IconifyPluginOptions extends IconCSSIconSetOptions {
/**
* Options for locating icon sets
*/
declare interface IconifyPluginFileOptions {
files?: Record<string, string>;
}
/**
* All options
*/
export declare interface IconifyPluginOptions extends IconCSSIconSetOptions, IconifyPluginFileOptions {
}
export { }

15

dist/plugin.js

@@ -10,3 +10,3 @@ /**

* @license MIT
* @version 0.0.1
* @version 0.0.2
*/

@@ -318,3 +318,6 @@ 'use strict';

*/
function locateIconSet(prefix) {
function locateIconSet(prefix, options) {
if (options.files?.[prefix]) {
return options.files?.[prefix];
}
try {

@@ -332,4 +335,4 @@ return require.resolve(`@iconify-json/${prefix}/icons.json`);

*/
function loadIconSet(prefix) {
const filename = locateIconSet(prefix);
function loadIconSet(prefix, options) {
const filename = locateIconSet(prefix, options);
if (filename) {

@@ -414,3 +417,3 @@ try {

for (const prefix in prefixes) {
const iconSet = loadIconSet(prefix);
const iconSet = loadIconSet(prefix, options);
if (!iconSet) {

@@ -437,4 +440,4 @@ throw new Error(`Cannot load icon set for "${prefix}"`);

function iconifyPlugin(icons, options = {}) {
const rules = getCSSRules(icons, options);
return plugin(({ addUtilities }) => {
const rules = getCSSRules(icons, options);
addUtilities(rules);

@@ -441,0 +444,0 @@ });

@@ -5,3 +5,3 @@ {

"author": "Vjacheslav Trushkin <cyberalien@gmail.com> (https://iconify.design)",
"version": "0.0.1",
"version": "0.0.2",
"license": "MIT",

@@ -8,0 +8,0 @@ "main": "./dist/plugin.js",

@@ -16,4 +16,4 @@ # Iconify for Tailwind CSS

- Class name for icon set.
- Class name for icon.
- Class name for icon set: `icon--{prefix}`.
- Class name for icon: `icon--{prefix}--{name}`.

@@ -24,3 +24,3 @@ ```html

Why 2 class names? It reduces duplication and makes it easy to change all icons from one icon set.
Why 2 class names? It reduces duplication and makes it easy to target all icons from one icon set.

@@ -31,2 +31,4 @@ You can change that with options: you can change class names format, you can disable common selector. See [options for function used by plugin](https://docs.iconify.design/tools/utils/get-icons-css.html).

Monoton icons can change color! See [Iconify documentation](https://docs.iconify.design/icon-components/css.html#mask) for longer explanation.
To change icon size or color, change font size or text color, like you would with any text.

@@ -56,4 +58,2 @@

Then you need to add and configure plugin.
Add this to `tailwind.config.js`:

@@ -60,0 +60,0 @@

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