Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save blopa/87869b2d47f3020992d3498f30e6ee51 to your computer and use it in GitHub Desktop.
Save blopa/87869b2d47f3020992d3498f30e6ee51 to your computer and use it in GitHub Desktop.
Code for post "I built a retro RPG game shop extension for my Magento 2 store"
<!-- Category Tabs -->
<div v-if="activeView === 'list'" class="flex flex-wrap gap-2 mb-3">
<button v-for="cat in categories" :key="cat.id"
class="px-3 py-1 border border-orange-500 hover:bg-orange-500 hover:text-black transition"
:class="{'bg-orange-500 text-black': currentCategoryId === cat.id}"
@click="loadProducts(cat.id, cat.name)">
{{ cat.name }}
</button>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment