Skip to content

Commit

Permalink
fix(plugin): remove warning for apexcharts if not used
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltanszogyenyi committed Aug 1, 2023
1 parent c1e070b commit 75a443b
Showing 1 changed file with 24 additions and 19 deletions.
43 changes: 24 additions & 19 deletions plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -804,26 +804,31 @@ module.exports = plugin.withOptions(
}
};
},
function (options) {
return {
safelist: [
// datepicker classes
'w-64',
'w-1/2',
'rounded-l-lg',
'rounded-r-lg',
'bg-gray-200',
'grid-cols-4',
'grid-cols-7',
'h-6',
'leading-6',
'h-9',
'leading-9',
'shadow-lg',
function (options = {}) {
// Enable forms and tooltip by default if not specified in options
const { charts = false, forms = true, tooltips = true } = options;

// chart classes
{ pattern: /^apexcharts-.*$/ },
],
const safelist = [
'w-64',
'w-1/2',
'rounded-l-lg',
'rounded-r-lg',
'bg-gray-200',
'grid-cols-4',
'grid-cols-7',
'h-6',
'leading-6',
'h-9',
'leading-9',
'shadow-lg',
];

if (charts) {
safelist.push({ pattern: /^apexcharts-.*$/ });
}

return {
safelist: safelist,
darkMode: 'class', // or 'media' or 'class',
theme: {
extend: {
Expand Down

0 comments on commit 75a443b

Please sign in to comment.