From 27584e7d4849dba76fceb71ec9436c1287089aaa Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Wed, 13 Nov 2024 15:17:12 +0300 Subject: [PATCH] Support for selected base preset --- apps/showcase/components/layout/AppDesigner.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/showcase/components/layout/AppDesigner.vue b/apps/showcase/components/layout/AppDesigner.vue index bcd1f9460..34c15bdc2 100644 --- a/apps/showcase/components/layout/AppDesigner.vue +++ b/apps/showcase/components/layout/AppDesigner.vue @@ -202,15 +202,16 @@ export default { updatePreset(this.preset); }, download() { + const basePreset = this.$appState.preset; const theme = JSON.stringify(this.preset, null, 4).replace(/"([^"]+)":/g, '$1:'); const textContent = `import { createApp } from "vue"; import PrimeVue from "primevue/config"; -import Aura from "@primevue/themes/aura"; +import {${basePreset}} from "@primevue/themes/${basePreset.toLowerCase()}"; import { definePreset } from "@primevue/themes"; const app = createApp(App); -const MyPreset = definePreset(Aura, ${theme}); +const MyPreset = definePreset(${basePreset}, ${theme}); app.use(PrimeVue, { theme: {