2023-02-28 08:29:30 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
|
|
|
<p>Message component is handy when displaying error messages next to form elements.</p>
|
|
|
|
</DocSectionText>
|
|
|
|
<div class="card">
|
|
|
|
<div class="flex flex-wrap align-items-center mb-3 gap-2">
|
|
|
|
<label for="username" class="p-sr-only">Username</label>
|
|
|
|
<InputText id="username" placeholder="Username" class="p-invalid" />
|
|
|
|
<InlineMessage>Username is required</InlineMessage>
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-wrap align-items-center gap-2">
|
|
|
|
<label for="email" class="p-sr-only">email</label>
|
|
|
|
<InputText id="email" placeholder="Email" class="p-invalid" />
|
|
|
|
<InlineMessage />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
code: {
|
2023-09-22 12:54:14 +00:00
|
|
|
basic: `
|
|
|
|
<div class="flex flex-wrap align-items-center mb-3 gap-2">
|
2023-02-28 08:29:30 +00:00
|
|
|
<label for="username" class="p-sr-only">Username</label>
|
|
|
|
<InputText id="username" placeholder="Username" class="p-invalid" />
|
|
|
|
<InlineMessage>Username is required</InlineMessage>
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-wrap align-items-center gap-2">
|
|
|
|
<label for="email" class="p-sr-only">email</label>
|
|
|
|
<InputText id="email" placeholder="Email" class="p-invalid" />
|
|
|
|
<InlineMessage />
|
2023-10-15 09:38:39 +00:00
|
|
|
</div>
|
|
|
|
`,
|
2023-09-22 12:54:14 +00:00
|
|
|
options: `
|
|
|
|
<template>
|
2023-02-28 08:29:30 +00:00
|
|
|
<div class="card">
|
|
|
|
<div class="flex flex-wrap align-items-center mb-3 gap-2">
|
|
|
|
<label for="username" class="p-sr-only">Username</label>
|
|
|
|
<InputText id="username" placeholder="Username" class="p-invalid" />
|
|
|
|
<InlineMessage>Username is required</InlineMessage>
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-wrap align-items-center gap-2">
|
|
|
|
<label for="email" class="p-sr-only">email</label>
|
|
|
|
<InputText id="email" placeholder="Email" class="p-invalid" />
|
|
|
|
<InlineMessage />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2023-10-15 09:38:39 +00:00
|
|
|
<\/script>
|
|
|
|
`,
|
2023-09-22 12:54:14 +00:00
|
|
|
composition: `
|
|
|
|
<template>
|
2023-02-28 08:29:30 +00:00
|
|
|
<div class="card">
|
|
|
|
<div class="flex flex-wrap align-items-center mb-3 gap-2">
|
|
|
|
<label for="username" class="p-sr-only">Username</label>
|
|
|
|
<InputText id="username" placeholder="Username" class="p-invalid" />
|
|
|
|
<InlineMessage>Username is required</InlineMessage>
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-wrap align-items-center gap-2">
|
|
|
|
<label for="email" class="p-sr-only">email</label>
|
|
|
|
<InputText id="email" placeholder="Email" class="p-invalid" />
|
|
|
|
<InlineMessage />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
2023-10-15 09:38:39 +00:00
|
|
|
<\/script>
|
|
|
|
`
|
2023-02-28 08:29:30 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|