2024-03-30 23:15:56 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
|
|
|
<p>The <i>definePreset</i> utility is used to customize an existing preset during the PrimeVue setup. The first parameter is the preset to customize and the second is the design tokens to override.</p>
|
|
|
|
</DocSectionText>
|
|
|
|
<DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
code: {
|
|
|
|
basic: `
|
|
|
|
import PrimeVue from 'primevue/config';
|
|
|
|
import { definePreset } from 'primevue/themes';
|
2024-05-01 08:32:55 +00:00
|
|
|
import Aura from 'primevue/themes/aura';
|
2024-03-30 23:15:56 +00:00
|
|
|
|
|
|
|
const MyPreset = definePreset(Aura, {
|
|
|
|
//Your customizations, see the following sections for examples
|
|
|
|
});
|
|
|
|
|
|
|
|
app.use(PrimeVue, {
|
|
|
|
theme: {
|
|
|
|
preset: MyPreset
|
|
|
|
}
|
|
|
|
});
|
|
|
|
`
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|