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

83 lines
2.1 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">
<InputGroupAddon>USD</InputGroupAddon>
<IftaLabel>
<InputText id="price" v-model="value" />
<label for="price">Price</label>
</IftaLabel>
<InputGroupAddon>.00</InputGroupAddon>
</InputGroup>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
value: null,
code: {
basic: `
<InputGroup>
<InputGroupAddon>USD</InputGroupAddon>
<IftaLabel>
<InputText id="price" v-model="value" />
<label for="price">Price</label>
</IftaLabel>
<InputGroupAddon>.00</InputGroupAddon>
</InputGroup>
`,
options: `
<template>
<div class="card flex justify-center">
<InputGroup class="md:w-80">
<InputGroupAddon>USD</InputGroupAddon>
<IftaLabel>
<InputText id="price" v-model="value" />
<label for="price">Price</label>
</IftaLabel>
<InputGroupAddon>.00</InputGroupAddon>
</InputGroup>
</div>
</template>
<script>
export default {
data() {
return {
value: null
}
}
}
<\/script>
`,
composition: `
<template>
<div class="card flex justify-center">
<InputGroup class="md:w-80">
<InputGroupAddon>USD</InputGroupAddon>
<IftaLabel>
<InputText id="price" v-model="value" />
<label for="price">Price</label>
</IftaLabel>
<InputGroupAddon>.00</InputGroupAddon>
</InputGroup>
</div>
</template>
<script setup>
import { ref } from 'vue';
const value = ref(null);
<\/script>
`
}
};
}
};
</script>