mirror of
https://github.com/iconify/iconify.git
synced 2025-01-08 07:48:29 +00:00
chore(tailwind): make prefixes list optional
This commit is contained in:
parent
dde22dea42
commit
a000307d6f
@ -89,8 +89,7 @@ module.exports = {
|
|||||||
maskSelector: '.iconify-nosize',
|
maskSelector: '.iconify-nosize',
|
||||||
backgroundSelector: '',
|
backgroundSelector: '',
|
||||||
scale: 0,
|
scale: 0,
|
||||||
// Empty prefixes list: reusing data from plugin above
|
// No prefixes list: reusing data from plugin above
|
||||||
prefixes: [],
|
|
||||||
}),
|
}),
|
||||||
// Plugin with clean selectors: requires writing all used icons in first parameter
|
// Plugin with clean selectors: requires writing all used icons in first parameter
|
||||||
addCleanIconSelectors(['mdi-light:home']),
|
addCleanIconSelectors(['mdi-light:home']),
|
||||||
|
@ -95,7 +95,7 @@ export interface IconifyPluginOptionsObject {
|
|||||||
scale?: number;
|
scale?: number;
|
||||||
|
|
||||||
// Prefixes to load
|
// Prefixes to load
|
||||||
prefixes: IconifyPluginListOptions;
|
prefixes?: IconifyPluginListOptions;
|
||||||
|
|
||||||
// Customise callback
|
// Customise callback
|
||||||
customise?: (content: string, name: string, prefix: string) => string;
|
customise?: (content: string, name: string, prefix: string) => string;
|
||||||
|
@ -73,7 +73,7 @@ export function getCSSRulesForPlugin(options: IconifyPluginOptions) {
|
|||||||
// Add icon sets
|
// Add icon sets
|
||||||
const iconSelector = fullOptions.iconSelector || '.{prefix}--{name}';
|
const iconSelector = fullOptions.iconSelector || '.{prefix}--{name}';
|
||||||
|
|
||||||
fullOptions.prefixes.forEach((item) => {
|
fullOptions.prefixes?.forEach((item) => {
|
||||||
let prefix: string;
|
let prefix: string;
|
||||||
let iconSet: IconifyJSON | undefined;
|
let iconSet: IconifyJSON | undefined;
|
||||||
let iconsList: IconsListOption | undefined;
|
let iconsList: IconsListOption | undefined;
|
||||||
|
Loading…
Reference in New Issue
Block a user