primevue-mirror/doc/button/IconsDoc.vue

52 lines
1.4 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Icon of a button is specified with <i>icon</i> property and position is configured using <i>iconPos</i> attribute.</p>
</DocSectionText>
<div class="card flex flex-wrap gap-3 justify-content-center">
<Button icon="pi pi-check" aria-label="Submit" />
<Button label="Submit" icon="pi pi-check" />
<Button label="Submit" icon="pi pi-check" iconPos="right" />
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
2023-09-22 12:54:14 +00:00
basic: `
<Button icon="pi pi-check" aria-label="Submit" />
2023-02-28 08:29:30 +00:00
<Button label="Submit" icon="pi pi-check" />
2023-10-15 09:38:39 +00:00
<Button label="Submit" icon="pi pi-check" iconPos="right" />
`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2023-11-09 15:06:13 +00:00
<div class="card flex flex-wrap gap-3 justify-content-center">
2023-02-28 08:29:30 +00:00
<Button icon="pi pi-check" aria-label="Submit" />
<Button label="Submit" icon="pi pi-check" />
<Button label="Submit" icon="pi pi-check" iconPos="right" />
</div>
</template>
<script>
2023-10-15 09:38:39 +00:00
<\/script>
`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-11-09 15:06:13 +00:00
<div class="card flex flex-wrap gap-3 justify-content-center">
2023-02-28 08:29:30 +00:00
<Button icon="pi pi-check" aria-label="Submit" />
<Button label="Submit" icon="pi pi-check" />
<Button label="Submit" icon="pi pi-check" iconPos="right" />
2024-03-17 13:09:03 +00:00
</div>
2023-02-28 08:29:30 +00:00
</template>
<script setup>
2023-10-15 09:38:39 +00:00
<\/script>
`
2023-02-28 08:29:30 +00:00
}
};
}
};
</script>