2024-09-20 11:56:25 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
2024-10-28 15:22:36 +00:00
|
|
|
<p>
|
|
|
|
Section names prefixed with <i>pc</i> denote PrimeVue components, distinguishing them from standard DOM elements and indicating the necessity for a nested structure. For example, the "badge" section is identified as <i>pcBadge</i> because
|
|
|
|
the button component incorporates the badge component internally.
|
|
|
|
</p>
|
2024-09-20 11:56:25 +00:00
|
|
|
</DocSectionText>
|
|
|
|
<div class="card flex justify-center">
|
|
|
|
<Button
|
|
|
|
type="button"
|
|
|
|
label="Messages"
|
2024-10-28 15:22:36 +00:00
|
|
|
icon="pi pi-inbox"
|
2024-09-20 11:56:25 +00:00
|
|
|
badge="2"
|
2024-10-28 15:22:36 +00:00
|
|
|
variant="outlined"
|
|
|
|
severity="secondary"
|
2024-09-20 11:56:25 +00:00
|
|
|
:pt="{
|
2024-10-28 15:22:36 +00:00
|
|
|
root: '!px-4 !py-3',
|
|
|
|
icon: '!text-xl !text-violet-500 dark:!text-violet-400',
|
|
|
|
label: '!text-lg !text-violet-500 dark:!text-violet-400',
|
2024-09-20 11:56:25 +00:00
|
|
|
pcBadge: {
|
2024-10-28 15:22:36 +00:00
|
|
|
root: '!bg-violet-500 dark:!bg-violet-400 !text-white dark:!text-black'
|
2024-09-20 11:56:25 +00:00
|
|
|
}
|
|
|
|
}"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
code: {
|
|
|
|
basic: `
|
2024-10-28 15:22:36 +00:00
|
|
|
<Button
|
|
|
|
type="button"
|
|
|
|
label="Messages"
|
|
|
|
icon="pi pi-inbox"
|
|
|
|
badge="2"
|
|
|
|
variant="outlined"
|
|
|
|
severity="secondary"
|
2024-09-20 11:56:25 +00:00
|
|
|
:pt="{
|
2024-10-28 15:22:36 +00:00
|
|
|
root: '!px-4 !py-3',
|
|
|
|
icon: '!text-xl !text-violet-500 dark:!text-violet-400',
|
|
|
|
label: '!text-lg !text-violet-500 dark:!text-violet-400',
|
2024-09-20 11:56:25 +00:00
|
|
|
pcBadge: {
|
2024-10-28 15:22:36 +00:00
|
|
|
root: '!bg-violet-500 dark:!bg-violet-400 !text-white dark:!text-black'
|
2024-09-20 11:56:25 +00:00
|
|
|
}
|
|
|
|
}"
|
|
|
|
/>
|
|
|
|
`,
|
|
|
|
options: `
|
|
|
|
<template>
|
2024-10-28 15:22:36 +00:00
|
|
|
<Button
|
|
|
|
type="button"
|
|
|
|
label="Messages"
|
|
|
|
icon="pi pi-inbox"
|
|
|
|
badge="2"
|
|
|
|
variant="outlined"
|
|
|
|
severity="secondary"
|
2024-09-20 11:56:25 +00:00
|
|
|
:pt="{
|
2024-10-28 15:22:36 +00:00
|
|
|
root: '!px-4 !py-3',
|
|
|
|
icon: '!text-xl !text-violet-500 dark:!text-violet-400',
|
|
|
|
label: '!text-lg !text-violet-500 dark:!text-violet-400',
|
2024-09-20 11:56:25 +00:00
|
|
|
pcBadge: {
|
2024-10-28 15:22:36 +00:00
|
|
|
root: '!bg-violet-500 dark:!bg-violet-400 !text-white dark:!text-black'
|
2024-09-20 11:56:25 +00:00
|
|
|
}
|
|
|
|
}"
|
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
`,
|
|
|
|
composition: `
|
|
|
|
<template>
|
2024-10-28 15:22:36 +00:00
|
|
|
<Button
|
|
|
|
type="button"
|
|
|
|
label="Messages"
|
|
|
|
icon="pi pi-inbox"
|
|
|
|
badge="2"
|
|
|
|
variant="outlined"
|
|
|
|
severity="secondary"
|
2024-09-20 11:56:25 +00:00
|
|
|
:pt="{
|
2024-10-28 15:22:36 +00:00
|
|
|
root: '!px-4 !py-3',
|
|
|
|
icon: '!text-xl !text-violet-500 dark:!text-violet-400',
|
|
|
|
label: '!text-lg !text-violet-500 dark:!text-violet-400',
|
2024-09-20 11:56:25 +00:00
|
|
|
pcBadge: {
|
2024-10-28 15:22:36 +00:00
|
|
|
root: '!bg-violet-500 dark:!bg-violet-400 !text-white dark:!text-black'
|
2024-09-20 11:56:25 +00:00
|
|
|
}
|
|
|
|
}"
|
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
`
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|