primevue-mirror/doc/chip/BasicDoc.vue

52 lines
1.3 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>A basic chip with a text is created with the <i>label</i> property. In addition when <i>removable</i> is added, a delete icon is displayed to remove a chip.</p>
</DocSectionText>
<div class="card flex flex-wrap gap-2">
<Chip label="Action" />
<Chip label="Comedy" />
<Chip label="Mystery" />
<Chip label="Thriller" removable />
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
2023-08-16 13:58:31 +00:00
basic: `<Chip label="Action" />
2023-02-28 08:29:30 +00:00
<Chip label="Comedy" />
<Chip label="Mystery" />
<Chip label="Thriller" removable />`,
2023-08-16 13:58:31 +00:00
options: `<template>
2023-02-28 08:29:30 +00:00
<div class="card flex flex-wrap gap-2">
<Chip label="Action" />
<Chip label="Comedy" />
<Chip label="Mystery" />
<Chip label="Thriller" removable />
</div>
</template>
<script>
<\/script>`,
2023-08-16 13:58:31 +00:00
composition: `<template>
2023-02-28 08:29:30 +00:00
<div class="card flex flex-wrap gap-2">
<Chip label="Action" />
<Chip label="Comedy" />
<Chip label="Mystery" />
<Chip label="Thriller" removable />
</div>
</template>
<script setup>
<\/script>`
}
};
}
};
</script>