mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Update Tailwind folder structure
This commit is contained in:
parent
073c18d0f6
commit
27eb773d30
10 changed files with 46 additions and 12 deletions
19
components/lib/passthrough/index.js
Normal file
19
components/lib/passthrough/index.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { mergeProps } from 'vue';
|
||||
|
||||
// @todo: Improve this method
|
||||
export const usePassThrough = (theme, pt = {}, { merge = false }) => {
|
||||
const newTheme = { ...theme };
|
||||
const componentNames = Object.keys(pt);
|
||||
|
||||
return componentNames.reduce((t, n) => {
|
||||
if (!merge) {
|
||||
t[n] = pt[n];
|
||||
} else {
|
||||
t[n] = Object.entries(pt[n]).reduce((_t, [sk, sv]) => {
|
||||
return mergeProps(t[n][sk], sv);
|
||||
}, {});
|
||||
}
|
||||
|
||||
return t;
|
||||
}, newTheme);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue