primevue-mirror/apps/volt/doc/chip/TemplateDoc.vue

33 lines
937 B
Vue
Raw Normal View History

2025-03-03 14:59:38 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>The default slot allows displaying custom content inside a chip.</p>
</DocSectionText>
<div class="card">
2025-03-03 17:00:34 +00:00
<Chip pt:root:class="py-0 pl-0 pr-4" removable>
2025-03-03 14:59:38 +00:00
<span class="bg-primary text-primary-contrast rounded-full w-8 h-8 flex items-center justify-center">P</span>
<span class="font-medium">PRIME</span>
</Chip>
</div>
<DocSectionCode :code="code" />
</template>
<script setup>
import Chip from '@/volt/chip';
import { ref } from 'vue';
const code = ref(`
<template>
<div class="card">
2025-03-03 17:00:34 +00:00
<Chip pt:root:class="py-0 pl-0 pr-4">
2025-03-03 14:59:38 +00:00
<span class="bg-primary text-primary-contrast rounded-full w-8 h-8 flex items-center justify-center">P</span>
<span class="font-medium">PRIME</span>
</Chip>
</div>
</template>
2025-03-03 19:38:57 +00:00
<script setup>
import Chip from '@/volt/chip';
<\/script>
2025-03-03 14:59:38 +00:00
`);
</script>