Is there a way to utilize props to define the input type in a form?
The method below doesn't appear to be effective, are there any alternative approaches?
For instance
<script setup>
defineProps({
InputType: String,
InputId: String,
InputLabel: String,
InputPlaceholder: String
});
</script>
<template>
<div class="ml-6 mt-5 mr-6 mb-5 lg:w-1/2">
<label
:for="InputId"
class="block text-sm font-medium leading-6 text-gray-900"
>
{{ InputLabel }}
</label>
<div class="mt-2">
<input
:id="InputId"
:type="InputType"
class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-pink-600 sm:text-sm sm:leading-6"
:placeholder="InputPlaceholder"
/>
</div>
</div>
</template>