mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Theming API: Added fallback param to inline dt method.
This commit is contained in:
parent
c25b2e0559
commit
468106cfb8
3 changed files with 8 additions and 8 deletions
|
@ -63,7 +63,7 @@ export default {
|
|||
semantic_css = `${semantic_light_css}${semantic_dark_css}`;
|
||||
}
|
||||
|
||||
global_css = SharedUtils.object.getItemValue(base?.global?.css, { ...params, dt: (tokenPath, type) => dt(theme, tokenPath, type) });
|
||||
global_css = SharedUtils.object.getItemValue(base?.global?.css, { ...params, dt: (tokenPath, fallback, type) => dt(theme, tokenPath, fallback, type) });
|
||||
|
||||
return {
|
||||
primitive: primitive_css,
|
||||
|
@ -84,7 +84,7 @@ export default {
|
|||
getBaseC({ name = '', theme = {}, params, set, defaults }) {
|
||||
const { base, options } = theme;
|
||||
const { css } = base?.components?.[name] || {};
|
||||
const computed_css = SharedUtils.object.getItemValue(css, { ...params, dt: (tokenPath, type) => dt(theme, tokenPath, type) });
|
||||
const computed_css = SharedUtils.object.getItemValue(css, { ...params, dt: (tokenPath, fallback, type) => dt(theme, tokenPath, fallback, type) });
|
||||
|
||||
return this._transformCSS(name, computed_css, undefined, 'style', options, set, defaults);
|
||||
},
|
||||
|
@ -101,7 +101,7 @@ export default {
|
|||
getBaseD({ name = '', theme = {}, params, set, defaults }) {
|
||||
const { base, options } = theme;
|
||||
const { css } = base?.directives?.[name] || {};
|
||||
const computed_css = SharedUtils.object.getItemValue(css, { ...params, dt: (tokenPath, type) => dt(theme, tokenPath, type) });
|
||||
const computed_css = SharedUtils.object.getItemValue(css, { ...params, dt: (tokenPath, fallback, type) => dt(theme, tokenPath, fallback, type) });
|
||||
|
||||
return this._transformCSS(name, computed_css, undefined, 'style', options, set, defaults);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue