|
|
|
@ -1,12 +1,19 @@ |
|
|
|
<template> |
|
|
|
<div class="flex space-x-4 flex-wrap justify-center"> |
|
|
|
<label v-for="(item, index) in options" :key="index" class="w-40" :for="`${id}-${index}`"> |
|
|
|
<input :id="`${id}-${index}`" class="invisible absolute left-0 top-0 peer" :checked="value === item.key" |
|
|
|
:value="item.key" type="radio" :name="id" @click="$emit('update:modelValue', item.key)" /> |
|
|
|
<input |
|
|
|
:id="`${id}-${index}`" |
|
|
|
class="invisible absolute left-0 top-0 peer" |
|
|
|
:checked="value === item.key" |
|
|
|
:value="item.key" |
|
|
|
type="radio" |
|
|
|
:name="id" |
|
|
|
@click="$emit('update:modelValue', item.key)" |
|
|
|
/> |
|
|
|
<span |
|
|
|
class="flex cursor-pointer flex-col rounded-lg items-center justify-center border border-b-[10px] border-transparent border-solid peer-checked:border-b-primary peer-checked:border-gray-200 peer-checked:shadow-xl h-40 transition-all duration-200 items-end"> |
|
|
|
<img :src="`/wp-content/plugins/stepper/resources/img/icons/${item.icon}.svg`" |
|
|
|
class="w-16 h-16 flex-none" /> |
|
|
|
class="flex cursor-pointer flex-col rounded-lg items-center justify-center border border-b-[10px] border-transparent border-solid peer-checked:border-b-primarycustom peer-checked:border-gray-200 peer-checked:shadow-xl h-40 transition-all duration-200 items-end" |
|
|
|
> |
|
|
|
<img :src="`/wp-content/plugins/stepper/resources/img/icons/${item.icon}.svg`" class="w-16 h-16 flex-none" /> |
|
|
|
<span class="mt-4 font-semibold text-gray-700 text-sm" v-text="item.label"></span> |
|
|
|
</span> |
|
|
|
</label> |
|
|
|
|