mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 08:52:34 +00:00
Refactor on theme structure
This commit is contained in:
parent
c828680c69
commit
43d561a2b6
16 changed files with 345 additions and 330 deletions
|
@ -1,13 +1,9 @@
|
|||
import SharedUtils from './sharedUtils';
|
||||
import Theme, { SharedUtils } from 'primevue/themes';
|
||||
|
||||
const VARIABLE = {
|
||||
PREFIX: '',
|
||||
SELECTOR: ':root',
|
||||
EXCLUDED_KEY_REGEX: /^(primitive|semantic|variables|colorscheme|light|dark|common|colors|root|states)$/gi
|
||||
};
|
||||
const VARIABLE = Theme.defaults.variable;
|
||||
|
||||
export default function (theme, options = {}) {
|
||||
const { prefix = VARIABLE.PREFIX, selector = VARIABLE.SELECTOR, excludedKeyRegex = VARIABLE.EXCLUDED_KEY_REGEX } = options;
|
||||
const { prefix = VARIABLE.prefix, selector = VARIABLE.selector, excludedKeyRegex = VARIABLE.excludedKeyRegex } = options;
|
||||
|
||||
const _toVariables = (_theme, _prefix = '') => {
|
||||
return Object.entries(_theme).reduce((acc, [key, value]) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue