primevue-mirror/doc/theming/styled/utils/UsePresetDoc.vue

25 lines
522 B
Vue
Raw Normal View History

2024-03-30 23:15:56 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Replaces the current presets entirely, common use case is changing the preset dynamically at runtime.</p>
</DocSectionText>
<DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz />
</template>
<script>
export default {
data() {
return {
code: {
basic: `
import { usePreset } from 'primevue/themes';
const onButtonClick() {
usePreset(MyPreset);
}
`
}
};
}
};
</script>