Theming API: Rename `updatePrimary` and `updateSurface` with `updatePrimaryPalette` and `updateSurfacePalette`

pull/5507/head
mertsincan 2024-04-01 11:12:58 +01:00
parent 546dbbf25f
commit 835e6ca234
4 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
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 updatePrimaryPalette } from './updatePrimaryPalette';
export { default as updateSurfacePalette } from './updateSurfacePalette';
export { default as usePreset } from './usePreset';
export { default as useTheme } from './useTheme';

View File

@ -39,7 +39,7 @@
<script>
import EventBus from '@/layouts/AppEventBus';
import { updatePreset, updateSurface } from 'primevue/themes';
import { updatePreset, updateSurfacePalette } from 'primevue/themes';
export default {
data() {
@ -97,7 +97,7 @@ export default {
{
name: 'ocean',
palette: { 0: '#ffffff', 50: '#fbfcfc', 100: '#F7F9F8', 200: '#EFF3F2', 300: '#DADEDD', 400: '#B1B7B6', 500: '#828787', 600: '#5F7274', 700: '#415B61', 800: '#29444E', 900: '#183240', 950: '#0c1920' }
},
}
]
};
},
@ -184,7 +184,7 @@ export default {
});
}
} else if (type === 'surface') {
updateSurface(color.palette);
updateSurfacePalette(color.palette);
}
EventBus.emit('theme-palette-change');