primevue-mirror/apps/showcase/doc/inputgroup/IftaLabelDoc.vue

87 lines
2.3 KiB
Vue
Raw Normal View History

<template>
<DocSectionText v-bind="$attrs">
<p>IftaLabel is used to create infield top aligned labels. Visit <PrimeVueNuxtLink to="/iftalabel">IftaLabel</PrimeVueNuxtLink> documentation for more information.</p>
</DocSectionText>
<div class="card flex justify-center">
<InputGroup class="md:w-80">
2024-09-20 18:08:09 +00:00
<InputGroupAddon>
<i class="pi pi-shopping-cart"></i>
</InputGroupAddon>
<IftaLabel>
2024-09-20 18:08:09 +00:00
<InputNumber v-model="value" inputId="price" mode="currency" currency="USD" locale="en-US" />
<label for="price">Price</label>
</IftaLabel>
</InputGroup>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
2024-09-20 18:08:09 +00:00
value: 10,
code: {
basic: `
2024-09-23 08:30:11 +00:00
<InputGroup class="md:w-80">
2024-09-20 18:08:09 +00:00
<InputGroupAddon>
<i class="pi pi-shopping-cart"></i>
</InputGroupAddon>
<IftaLabel>
2024-09-20 18:08:09 +00:00
<InputNumber v-model="value" inputId="price" mode="currency" currency="USD" locale="en-US" />
<label for="price">Price</label>
</IftaLabel>
</InputGroup>
`,
options: `
<template>
<div class="card flex justify-center">
<InputGroup class="md:w-80">
2024-09-20 18:08:09 +00:00
<InputGroupAddon>
<i class="pi pi-shopping-cart"></i>
</InputGroupAddon>
<IftaLabel>
2024-09-20 18:08:09 +00:00
<InputNumber v-model="value" inputId="price" mode="currency" currency="USD" locale="en-US" />
<label for="price">Price</label>
</IftaLabel>
</InputGroup>
</div>
</template>
<script>
export default {
data() {
return {
2024-09-20 18:08:09 +00:00
value: 10
}
}
}
<\/script>
`,
composition: `
<template>
<div class="card flex justify-center">
<InputGroup class="md:w-80">
2024-09-20 18:08:09 +00:00
<InputGroupAddon>
<i class="pi pi-shopping-cart"></i>
</InputGroupAddon>
<IftaLabel>
2024-09-20 18:08:09 +00:00
<InputNumber v-model="value" inputId="price" mode="currency" currency="USD" locale="en-US" />
<label for="price">Price</label>
</IftaLabel>
</InputGroup>
</div>
</template>
<script setup>
import { ref } from 'vue';
2024-09-20 18:08:09 +00:00
const value = ref(10);
<\/script>
`
}
};
}
};
</script>