primevue-mirror/apps/showcase/doc/passthrough/PCPrefixDoc.vue

75 lines
2.0 KiB
Vue
Raw Normal View History

2024-09-20 11:56:25 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Section names that start with the <i>pc</i> prefix indicate that the element is a PrimeVue component not a DOM element.</p>
</DocSectionText>
<div class="card flex justify-center">
<Button
type="button"
label="Messages"
icon="pi pi-users"
badge="2"
outlined
:pt="{
root: 'border-violet-500',
label: 'text-violet-900 dark:text-violet-400',
icon: 'text-violet-900 dark:text-violet-400',
pcBadge: {
root: '!bg-violet-400 !text-white'
}
}"
/>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
basic: `
<Button type="button" label="Messages" icon="pi pi-users" badge="2" outlined
:pt="{
root: 'border-violet-500',
label: 'text-violet-900 dark:text-violet-400',
icon: 'text-violet-900 dark:text-violet-400',
pcBadge: {
root: '!bg-violet-400 !text-white'
}
}"
/>
`,
options: `
<template>
<Button type="button" label="Messages" icon="pi pi-users" badge="2" outlined
:pt="{
root: 'border-violet-500',
label: 'text-violet-900 dark:text-violet-400',
icon: 'text-violet-900 dark:text-violet-400',
pcBadge: {
root: '!bg-violet-400 !text-white'
}
}"
/>
</template>
`,
composition: `
<template>
<Button type="button" label="Messages" icon="pi pi-users" badge="2" outlined
:pt="{
root: 'border-violet-500',
label: 'text-violet-900 dark:text-violet-400',
icon: 'text-violet-900 dark:text-violet-400',
pcBadge: {
root: '!bg-violet-400 !text-white'
}
}"
/>
</template>
`
}
};
}
};
</script>