41 lines
1018 B
Vue
41 lines
1018 B
Vue
<template>
|
|
<DocSectionText v-bind="$attrs">
|
|
<p>Merges the provided tokens to the current preset, an example would be changing the primary color palette dynamically.</p>
|
|
</DocSectionText>
|
|
<DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz />
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
code: {
|
|
basic: `
|
|
import { updatePreset } from '@primevue/themes';
|
|
|
|
const changePrimaryColor() {
|
|
updatePreset({
|
|
semantic: {
|
|
primary: {
|
|
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>
|