primevue-mirror/doc/inputgroup/ButtonDoc.vue

94 lines
2.5 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Buttons can be placed at either side of an input element.</p>
</DocSectionText>
<div class="card flex flex-column md:flex-row gap-3">
<InputGroup>
2023-02-28 08:29:30 +00:00
<Button label="Search" />
<InputText placeholder="Keyword" />
</InputGroup>
2023-02-28 08:29:30 +00:00
<InputGroup>
2023-02-28 08:29:30 +00:00
<InputText placeholder="Keyword" />
2023-03-03 12:15:20 +00:00
<Button icon="pi pi-search" severity="warning" />
</InputGroup>
2023-02-28 08:29:30 +00:00
<InputGroup>
2023-03-03 12:15:20 +00:00
<Button icon="pi pi-check" severity="success" />
2023-02-28 08:29:30 +00:00
<InputText placeholder="Vote" />
2023-03-03 12:15:20 +00:00
<Button icon="pi pi-times" severity="danger" />
</InputGroup>
2023-02-28 08:29:30 +00:00
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
2023-09-22 12:54:14 +00:00
basic: `
<InputGroup>
2023-02-28 08:29:30 +00:00
<Button label="Search" />
<InputText placeholder="Keyword" />
</InputGroup>
2023-02-28 08:29:30 +00:00
<InputGroup>
2023-02-28 08:29:30 +00:00
<InputText placeholder="Keyword" />
2023-03-03 12:15:20 +00:00
<Button icon="pi pi-search" severity="warning" />
</InputGroup>
2023-02-28 08:29:30 +00:00
<InputGroup>
2023-03-03 12:15:20 +00:00
<Button icon="pi pi-check" severity="success" />
2023-02-28 08:29:30 +00:00
<InputText placeholder="Vote" />
2023-03-03 12:15:20 +00:00
<Button icon="pi pi-times" severity="danger" />
</InputGroup>
2023-10-15 09:38:39 +00:00
`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card flex flex-column md:flex-row gap-3">
<InputGroup>
2023-02-28 08:29:30 +00:00
<Button label="Search" />
<InputText placeholder="Keyword" />
</InputGroup>
2023-02-28 08:29:30 +00:00
<InputGroup>
2023-02-28 08:29:30 +00:00
<InputText placeholder="Keyword" />
2023-03-03 12:15:20 +00:00
<Button icon="pi pi-search" severity="warning" />
</InputGroup>
2023-02-28 08:29:30 +00:00
<InputGroup>
2023-03-03 12:15:20 +00:00
<Button icon="pi pi-check" severity="success" />
2023-02-28 08:29:30 +00:00
<InputText placeholder="Vote" />
2023-03-03 12:15:20 +00:00
<Button icon="pi pi-times" severity="danger" />
</InputGroup>
2023-02-28 08:29:30 +00:00
</div>
2023-10-15 09:38:39 +00:00
</template>
`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card flex flex-column md:flex-row gap-3">
<InputGroup>
2023-02-28 08:29:30 +00:00
<Button label="Search" />
<InputText placeholder="Keyword" />
</InputGroup>
2023-02-28 08:29:30 +00:00
<InputGroup>
2023-02-28 08:29:30 +00:00
<InputText placeholder="Keyword" />
2023-03-03 12:15:20 +00:00
<Button icon="pi pi-search" severity="warning" />
</InputGroup>
2023-02-28 08:29:30 +00:00
<InputGroup>
2023-03-03 12:15:20 +00:00
<Button icon="pi pi-check" severity="success" />
2023-02-28 08:29:30 +00:00
<InputText placeholder="Vote" />
2023-03-03 12:15:20 +00:00
<Button icon="pi pi-times" severity="danger" />
</InputGroup>
2023-02-28 08:29:30 +00:00
</div>
2023-10-26 17:53:11 +00:00
</template>
`
2023-02-28 08:29:30 +00:00
}
};
}
};
</script>