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-01-23 12:30:07 +00:00
<Chip class="py-0 pl-0 pr-3">
2023-02-28 08:29:30 +00:00
<span class="bg-primary border-circle w-2rem h-2rem flex align-items-center justify-content-center">P</span>
<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-01-23 12:30:07 +00:00
<Chip class="py-0 pl-0 pr-3">
2023-02-28 08:29:30 +00:00
<span class="bg-primary border-circle w-2rem h-2rem flex align-items-center justify-content-center">P</span>
<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-01-23 12:30:07 +00:00
<Chip class="py-0 pl-0 pr-3">
2023-02-28 08:29:30 +00:00
<span class="bg-primary border-circle w-2rem h-2rem flex align-items-center justify-content-center">P</span>
<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-01-23 12:30:07 +00:00
<Chip class="py-0 pl-0 pr-3">
2023-02-28 08:29:30 +00:00
<span class="bg-primary border-circle w-2rem h-2rem flex align-items-center justify-content-center">P</span>
<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>