primevue-mirror/doc/floatlabel/BasicDoc.vue

68 lines
1.4 KiB
Vue
Raw Normal View History

2024-02-02 12:40:35 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>FloatLabel is used by wrapping the input and its label.</p>
</DocSectionText>
2024-05-20 12:14:38 +00:00
<div class="card flex justify-center">
2024-02-02 12:40:35 +00:00
<FloatLabel>
<InputText id="username" v-model="value" />
<label for="username">Username</label>
</FloatLabel>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
value: null,
code: {
basic: `
<FloatLabel>
<InputText id="username" v-model="value" />
<label for="username">Username</label>
</FloatLabel>
`,
options: `
<template>
2024-05-20 12:14:38 +00:00
<div class="card flex justify-center">
2024-02-02 12:40:35 +00:00
<FloatLabel>
<InputText id="username" v-model="value" />
<label for="username">Username</label>
</FloatLabel>
</div>
</template>
<script setup>
export default {
data() {
return {
value: null
}
}
}
<\/script>
`,
composition: `
<template>
2024-05-20 12:14:38 +00:00
<div class="card flex justify-center">
2024-02-02 12:40:35 +00:00
<FloatLabel>
<InputText id="username" v-model="value" />
<label for="username">Username</label>
</FloatLabel>
</div>
</template>
<script setup>
import { ref } from 'vue';
const value = ref(null);
<\/script>
`
}
};
}
};
</script>