<script setup lang="ts">
defineProps<{
  label: string;
  modelValue: string;
}>();
const emit = defineEmits<{
  (event: 'update:modelValue', value: string): void;
}>();
</script>

<template>
  <div>
    <label class="block text-sm font-medium text-gray-700">{{ label }}</label>
    <div class="mt-1 relative rounded-md shadow-sm">
      <textarea
        class="focus:ring-blue-500 focus:border-blue-500 block w-full border-gray-300 rounded-md"
        :value="modelValue"
        v-bind="$attrs"
        @input="emit('update:modelValue', $event.target.value)"
      />
    </div>
  </div>
</template>
