primevue-mirror/doc/inputgroup/ButtonDoc.vue

94 lines
2.4 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>
2024-05-20 12:14:38 +00:00
<div class="card flex flex-col md:flex-row gap-4">
<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" />
2024-04-16 07:35:56 +00:00
<Button icon="pi pi-search" severity="warn" />
</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" />
2024-04-16 07:35:56 +00:00
<Button icon="pi pi-search" severity="warn" />
</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>
2024-05-20 12:14:38 +00:00
<div class="card flex flex-col md:flex-row gap-4">
<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" />
2024-04-16 07:35:56 +00:00
<Button icon="pi pi-search" severity="warn" />
</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>
2024-05-20 12:14:38 +00:00
<div class="card flex flex-col md:flex-row gap-4">
<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" />
2024-04-16 07:35:56 +00:00
<Button icon="pi pi-search" severity="warn" />
</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>