primevue-mirror/apps/showcase/doc/iftalabel/BasicDoc.vue

68 lines
1.4 KiB
Vue
Raw Normal View History

2024-09-17 11:34:59 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>IftaLabel is used by wrapping the input and its label.</p>
</DocSectionText>
<div class="card flex justify-center">
<IftaLabel>
<InputText id="username" v-model="value" autocomplete="off" />
<label for="username">Username</label>
</IftaLabel>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
value: null,
code: {
basic: `
<IftaLabel>
2024-09-18 10:23:01 +00:00
<InputText id="username" v-model="value" />
2024-09-17 11:34:59 +00:00
<label for="username">Username</label>
</IftaLabel>
`,
options: `
<template>
<div class="card flex justify-center">
<IftaLabel>
2024-09-18 10:23:01 +00:00
<InputText id="username" v-model="value" />
2024-09-17 11:34:59 +00:00
<label for="username">Username</label>
</IftaLabel>
</div>
</template>
2024-09-23 08:30:11 +00:00
<script>
2024-09-17 11:34:59 +00:00
export default {
data() {
return {
value: null
}
}
}
<\/script>
`,
composition: `
<template>
<div class="card flex justify-center">
<IftaLabel>
2024-09-18 10:23:01 +00:00
<InputText id="username" v-model="value" />
2024-09-17 11:34:59 +00:00
<label for="username">Username</label>
</IftaLabel>
</div>
</template>
<script setup>
import { ref } from 'vue';
const value = ref(null);
<\/script>
`
}
};
}
};
</script>