primevue-mirror/doc/chip/TemplateDoc.vue

58 lines
1.5 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>The default slot allows displaying custom content inside a chip.</p>
</DocSectionText>
<div class="card">
2024-05-20 12:14:38 +00:00
<Chip class="py-0 pl-0 pr-4">
<span class="bg-primary text-primary-contrast rounded-full w-8 h-8 flex items-center justify-center">P</span>
2023-02-28 08:29:30 +00:00
<span class="ml-2 font-medium">PRIME</span>
</Chip>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
2023-09-22 12:54:14 +00:00
basic: `
2024-05-20 12:14:38 +00:00
<Chip class="py-0 pl-0 pr-4">
<span class="bg-primary text-primary-contrast rounded-full w-8 h-8 flex items-center justify-center">P</span>
2023-02-28 08:29:30 +00:00
<span class="ml-2 font-medium">PRIME</span>
2023-10-15 09:38:39 +00:00
</Chip>
`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card">
2024-05-20 12:14:38 +00:00
<Chip class="py-0 pl-0 pr-4">
<span class="bg-primary text-primary-contrast rounded-full w-8 h-8 flex items-center justify-center">P</span>
2023-02-28 08:29:30 +00:00
<span class="ml-2 font-medium">PRIME</span>
</Chip>
</div>
</template>
<script>
2023-10-15 09:38:39 +00:00
<\/script>
`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card">
2024-05-20 12:14:38 +00:00
<Chip class="py-0 pl-0 pr-4">
<span class="bg-primary text-primary-contrast rounded-full w-8 h-8 flex items-center justify-center">P</span>
2023-02-28 08:29:30 +00:00
<span class="ml-2 font-medium">PRIME</span>
</Chip>
</div>
</template>
<script setup>
2023-10-15 09:38:39 +00:00
<\/script>
`
2023-02-28 08:29:30 +00:00
}
};
}
};
</script>