diff --git a/components/lib/themes/actions/extendPreset.js b/components/lib/themes/actions/definePreset.js similarity index 100% rename from components/lib/themes/actions/extendPreset.js rename to components/lib/themes/actions/definePreset.js diff --git a/components/lib/themes/actions/index.js b/components/lib/themes/actions/index.js index 727194f8c..21d1646d8 100644 --- a/components/lib/themes/actions/index.js +++ b/components/lib/themes/actions/index.js @@ -1,5 +1,6 @@ -export { default as extendPreset } from './extendPreset'; +export { default as definePreset } from './definePreset'; export { default as updatePreset } from './updatePreset'; export { default as updatePrimary } from './updatePrimary'; export { default as updateSurface } from './updateSurface'; -export { default as updateTheme } from './updateTheme'; +export { default as usePreset } from './usePreset'; +export { default as useTheme } from './useTheme'; diff --git a/components/lib/themes/actions/usePreset.js b/components/lib/themes/actions/usePreset.js new file mode 100644 index 000000000..6b37ba089 --- /dev/null +++ b/components/lib/themes/actions/usePreset.js @@ -0,0 +1,7 @@ +import Theme from 'primevue/themes'; + +export default (preset) => { + Theme.setPreset(preset); + + return preset; +}; diff --git a/components/lib/themes/actions/updateTheme.js b/components/lib/themes/actions/useTheme.js similarity index 100% rename from components/lib/themes/actions/updateTheme.js rename to components/lib/themes/actions/useTheme.js