primevue-mirror/apps/showcase/doc/theming/styled/utils/UpdatePrimaryPaletteDoc.vue

37 lines
859 B
Vue
Raw Normal View History

2024-04-01 10:38:37 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Updates the primary colors, this is a shorthand to do the same update using <i>updatePreset</i>.</p>
</DocSectionText>
<DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz />
</template>
<script>
export default {
data() {
return {
code: {
basic: `
2024-06-11 12:21:12 +00:00
import { updatePrimaryPalette } from '@primevue/themes';
2024-04-01 10:38:37 +00:00
const changePrimaryColor() {
updatePrimaryPalette({
50: '{indigo.50}',
100: '{indigo.100}',
200: '{indigo.200}',
300: '{indigo.300}',
400: '{indigo.400}',
500: '{indigo.500}',
600: '{indigo.600}',
700: '{indigo.700}',
800: '{indigo.800}',
900: '{indigo.900}',
950: '{indigo.950}'
});
}
`
}
};
}
};
</script>