fix: display 'New' when DTL btn has alternatives

close #104
This commit is contained in:
Timothée Goguely 2025-01-27 11:07:35 +01:00
parent b725146861
commit f4a5e53140
2 changed files with 29 additions and 3 deletions

View file

@ -1,6 +1,7 @@
<template>
<button id="dtl-btn" class="bg-black rounded-md p-4" :title="'Design to Light: ' + grade" data-icon="leaf" :data-grade="grade" :data-new="hasAlternatives ? true : undefined">
<button id="dtl-btn" class="bg-black rounded-md p-4" :title="'Design to Light: ' + (hasAlternatives ? 'New' : grade)" data-icon="leaf" :data-grade="grade" :data-new="hasAlternatives ? true : undefined">
<span lang="en" class="sr-only">Design to Light</span>
<span v-if="hasAlternatives" lang="en" class="new">New</span>
</button>
</template>
<script setup>