Added label id's
This commit is contained in:
1 parent
88ae4f9453
commit
de80e00b55
3 files changed
+7
-4
No files matched your search
@@ -4,6 +4,7 @@ import { useLanguages } from "~/composables/useLanguages";
|
||||
interface Props {
|
||||
label?: string;
|
||||
modelValue?: string;
|
||||
direction?: string;
|
||||
}
|
||||
|
||||
const props = defineProps<Props>();
|
||||
@@ -16,12 +17,13 @@ const { languages } = useLanguages();
|
||||
|
||||
<template>
|
||||
<div class="language-selector">
|
||||
<label v-if="props.label" class="language-selector-label">
|
||||
<label v-if="props.label" class="language-selector-label" :for="props.direction">
|
||||
{{ props.label }}
|
||||
</label>
|
||||
<select
|
||||
class="language-selector-input select"
|
||||
v-model="model"
|
||||
:id="props.direction"
|
||||
>
|
||||
<option v-for="lang in languages" :key="lang.code" :value="lang.code">
|
||||
{{ lang.name }}
|
||||
|
||||
@@ -65,11 +65,12 @@ watch(
|
||||
|
||||
<template>
|
||||
<div class="text-input">
|
||||
<label v-if="props.label" class="text-input-label">
|
||||
<label v-if="props.label" class="text-input-label" for="textinput">
|
||||
{{ props.label }}
|
||||
</label>
|
||||
<textarea
|
||||
ref="textareaRef"
|
||||
id="textinput"
|
||||
class="text-input-area textarea"
|
||||
:value="props.modelValue"
|
||||
:placeholder="props.placeholder"
|
||||
|
||||
Reference in new issue
Block a user