Update IconDoc.vue

pull/4899/head
tugcekucukoglu 2023-11-28 12:56:21 +03:00
parent 3018da2fa4
commit 54919b1355
1 changed files with 68 additions and 11 deletions

View File

@ -1,9 +1,24 @@
<template> <template>
<DocSectionText v-bind="$attrs"> <DocSectionText v-bind="$attrs">
<p>An additional icon is displayed next to the input field when <i>showIcon</i> is present.</p> <p>An additional button is displayed next to the input field when <i>showIcon</i> is present. Also adding <i>iconDisplay</i> as <i>input</i> an icon will be displayed.</p>
</DocSectionText> </DocSectionText>
<div class="card flex justify-content-center"> <div class="card flex flex-wrap gap-3 p-fluid">
<Calendar v-model="date" showIcon /> <div class="flex-auto">
<label for="buttondisplay" class="font-bold block mb-2"> Button Display </label>
<Calendar v-model="buttondisplay" showIcon inputId="buttondisplay" />
</div>
<div class="flex-auto">
<label for="icondisplay" class="font-bold block mb-2"> Icon Display </label>
<Calendar v-model="icondisplay" showIcon iconDisplay="input" inputId="icondisplay" />
</div>
<div class="flex-auto">
<label for="templatedisplay" class="font-bold block mb-2"> Icon Template </label>
<Calendar v-model="templatedisplay" showIcon iconDisplay="input" timeOnly inputId="templatedisplay">
<template #inputicon="{ clickCallback }">
<i class="pi pi-clock" @click="clickCallback" />
</template>
</Calendar>
</div>
</div> </div>
<DocSectionCode :code="code" /> <DocSectionCode :code="code" />
</template> </template>
@ -12,15 +27,38 @@
export default { export default {
data() { data() {
return { return {
date: null, buttondisplay: null,
icondisplay: null,
templatedisplay: null,
code: { code: {
basic: ` basic: `
<Calendar v-model="date" showIcon /> <Calendar v-model="buttondisplay" showIcon />
<Calendar v-model="icondisplay" showIcon iconDisplay="input" />
<Calendar v-model="templatedisplay" showIcon iconDisplay="input" timeOnly>
<template #inputicon="{ clickCallback }">
<i class="pi pi-clock" @click="clickCallback" />
</template>
</Calendar>
`, `,
options: ` options: `
<template> <template>
<div class="card flex justify-content-center"> <div class="card flex flex-wrap gap-3 p-fluid">
<Calendar v-model="date" showIcon /> <div class="flex-auto">
<label for="buttondisplay" class="font-bold block mb-2"> Button Display </label>
<Calendar v-model="buttondisplay" showIcon inputId="buttondisplay" />
</div>
<div class="flex-auto">
<label for="icondisplay" class="font-bold block mb-2"> Icon Display </label>
<Calendar v-model="icondisplay" showIcon iconDisplay="input" inputId="icondisplay" />
</div>
<div class="flex-auto">
<label for="templatedisplay" class="font-bold block mb-2"> Icon Template </label>
<Calendar v-model="templatedisplay" showIcon iconDisplay="input" timeOnly inputId="templatedisplay">
<template #inputicon="{ clickCallback }">
<i class="pi pi-clock" @click="clickCallback" />
</template>
</Calendar>
</div>
</div> </div>
</template> </template>
@ -28,7 +66,9 @@ export default {
export default { export default {
data() { data() {
return { return {
date: null buttondisplay: null,
icondisplay: null,
templatedisplay: null,
}; };
} }
}; };
@ -36,15 +76,32 @@ export default {
`, `,
composition: ` composition: `
<template> <template>
<div class="card flex justify-content-center"> <div class="card flex flex-wrap gap-3 p-fluid">
<Calendar v-model="date" showIcon /> <div class="flex-auto">
<label for="buttondisplay" class="font-bold block mb-2"> Button Display </label>
<Calendar v-model="buttondisplay" showIcon inputId="buttondisplay" />
</div>
<div class="flex-auto">
<label for="icondisplay" class="font-bold block mb-2"> Icon Display </label>
<Calendar v-model="icondisplay" showIcon iconDisplay="input" inputId="icondisplay" />
</div>
<div class="flex-auto">
<label for="templatedisplay" class="font-bold block mb-2"> Icon Template </label>
<Calendar v-model="templatedisplay" showIcon iconDisplay="input" timeOnly inputId="templatedisplay">
<template #inputicon="{ clickCallback }">
<i class="pi pi-clock" @click="clickCallback" />
</template>
</Calendar>
</div>
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref } from "vue"; import { ref } from "vue";
const date = ref(); const buttondisplay = ref();
const icondisplay = ref();
const templatedisplay = ref();
<\/script> <\/script>
` `
} }