mirror of
https://github.com/iconify/iconify.git
synced 2025-01-05 15:02:09 +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',
|
||||
backgroundSelector: '',
|
||||
scale: 0,
|
||||
// Empty prefixes list: reusing data from plugin above
|
||||
prefixes: [],
|
||||
// No prefixes list: reusing data from plugin above
|
||||
}),
|
||||
// Plugin with clean selectors: requires writing all used icons in first parameter
|
||||
addCleanIconSelectors(['mdi-light:home']),
|
||||
|
@ -95,7 +95,7 @@ export interface IconifyPluginOptionsObject {
|
||||
scale?: number;
|
||||
|
||||
// Prefixes to load
|
||||
prefixes: IconifyPluginListOptions;
|
||||
prefixes?: IconifyPluginListOptions;
|
||||
|
||||
// Customise callback
|
||||
customise?: (content: string, name: string, prefix: string) => string;
|
||||
|
@ -73,7 +73,7 @@ export function getCSSRulesForPlugin(options: IconifyPluginOptions) {
|
||||
// Add icon sets
|
||||
const iconSelector = fullOptions.iconSelector || '.{prefix}--{name}';
|
||||
|
||||
fullOptions.prefixes.forEach((item) => {
|
||||
fullOptions.prefixes?.forEach((item) => {
|
||||
let prefix: string;
|
||||
let iconSet: IconifyJSON | undefined;
|
||||
let iconsList: IconsListOption | undefined;
|
||||
|
Loading…
Reference in New Issue
Block a user