I am having difficulty implementing a conditional Vue statement to change the CSS style based on the text value. Despite trying other tutorials, I have had no success due to my limited experience with Vue.
For example, if I want the class to be "is-success" when {{s.specialType}} == "food"
AND "is-danger" when {{s.specialType}} == "drink"
, how can I achieve this?
Any assistance would be greatly appreciated. Thank you
<div v-for="s in spc.specials" class="column is-one-third">
<div class="field">
<span class="tag is-success is-capitalized">{{s.specialType}}</span>
</div>
</div>