2
0
mirror of https://github.com/iconify/iconify.git synced 2025-01-05 23:10:40 +00:00

chore: publish update for tailwind plugin

This commit is contained in:
Vjacheslav Trushkin 2024-05-13 16:27:43 +03:00
parent a000307d6f
commit 21cf993858
2 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,7 @@
"name": "@iconify/tailwind",
"description": "Iconify plugin for Tailwind CSS",
"author": "Vjacheslav Trushkin <cyberalien@gmail.com> (https://iconify.design)",
"version": "1.0.1",
"version": "1.1.0",
"license": "MIT",
"main": "./dist/plugin.js",
"types": "./dist/plugin.d.ts",

View File

@ -8,7 +8,7 @@ import type { DynamicIconifyPluginOptions } from './helpers/options';
*/
export function getDynamicCSSRules(
icon: string,
{ scale = 1, ...options }: DynamicIconifyPluginOptions = {}
options: DynamicIconifyPluginOptions = {}
): Record<string, string> {
const nameParts = icon.split(/--|\:/);
if (nameParts.length !== 2) {
@ -36,6 +36,7 @@ export function getDynamicCSSRules(
throw new Error(`Cannot find "${icon}". Bad icon name?`);
}
const scale = options.scale ?? 1;
if (scale) {
generated.common.rules.height = scale + 'em';
generated.common.rules.width = scale + 'em';