add field types prop

This commit is contained in:
Pete Matsyburka
2024-01-10 23:18:30 +02:00
parent b6f43c9b23
commit f74ad050b4
5 changed files with 37 additions and 7 deletions
+7 -2
View File
@@ -72,7 +72,7 @@
:key="type"
>
<button
v-if="(withPhone || type != 'phone') && (withPayment || type != 'payment')"
v-if="(fieldTypes.length === 0 || fieldTypes.includes(type)) && (withPhone || type != 'phone') && (withPayment || type != 'payment')"
draggable="true"
class="group flex items-center justify-center border border-dashed border-base-300 hover:border-base-content/20 w-full rounded relative"
:style="{ backgroundColor: backgroundColor }"
@@ -91,7 +91,7 @@
</div>
</button>
<div
v-else-if="type == 'phone'"
v-else-if="type == 'phone' && (fieldTypes.length === 0 || fieldTypes.includes(type))"
class="tooltip tooltip-bottom flex"
:class="{'tooltip-bottom-start': !withPayment, 'tooltip-bottom': withPayment }"
data-tip="Unlock SMS-verified phone number field with paid plan. Use text field for phone numbers without verification."
@@ -190,6 +190,11 @@ export default {
required: false,
default: true
},
fieldTypes: {
type: Array,
required: false,
default: () => []
},
submitters: {
type: Array,
required: true