primevue-mirror/doc/unstyled/ThemeDoc.vue

43 lines
1.3 KiB
Vue
Raw Normal View History

2023-07-09 21:13:49 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>
An unstyled theme is basically a global <i>pt</i> configuration so that it can be defined only once from a single location, still a particular component can override a global configuration since the <i>pt</i> props of a component and the
global setting is merged with component having higher precedencee.
</p>
</DocSectionText>
2024-01-30 08:16:35 +00:00
<DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz />
2023-07-09 21:13:49 +00:00
</template>
<script>
export default {
data() {
return {
code: {
2023-09-22 12:54:14 +00:00
basic: `
import { createApp } from "vue";
2023-07-09 21:13:49 +00:00
import PrimeVue from "primevue/config";
const app = createApp(App);
2024-01-30 08:16:35 +00:00
app.use(PrimeVue, {
2023-07-09 21:13:49 +00:00
pt: {
button: {
root: { class: 'bg-teal-500 hover:bg-teal-700 cursor-pointer text-white p-3 border-round border-none flex gap-2' },
2023-07-11 23:14:34 +00:00
label: 'text-white font-bold text-xl', // OR { class: 'text-white font-bold text-xl' }
2024-01-30 08:16:35 +00:00
icon: 'text-white text-2xl'
2023-07-09 21:13:49 +00:00
},
panel: {
2023-07-11 23:14:34 +00:00
header: 'bg-primary border-primary',
content: 'border-primary text-lg text-primary-700',
title: 'bg-primary text-xl',
toggler: 'bg-primary hover:bg-primary-reverse'
2023-07-09 21:13:49 +00:00
}
2024-01-30 08:16:35 +00:00
}
2023-09-22 12:54:14 +00:00
});
`
2023-07-09 21:13:49 +00:00
}
};
}
};
</script>