Here's the code snippet I'm working with:
<div class="flex justify-between flex-wrap">
<div v-for="kink in kinks.data" :key="kink.id">
<button type="button" :class="enabled ? 'bg-red-600' : 'bg-gray-600'" class="m-1 my-2 inline-flex items-center px-3.5 py-2 border border-transparent text-sm leading-4 font-medium rounded-full shadow-sm text-white hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500"> {{ kink.name }}</button>
</div>
</div>
I have a data point kinks: []
. The goal is to let users click on multiple buttons, store the ID of each clicked button in a new data point, and toggle the color of the button between gray and red when clicked (up to 10 times).
This is new territory for me, and I'm struggling to figure out how to make it work. Any guidance or assistance would be greatly appreciated!