I'm experimenting with conditional logic to dynamically change the background color of a button. I've seen examples using the ternary operator to do so, but haven't come across any that utilize color variables defined in the theme options. Is it possible to achieve this effect by tapping into root-defined variable color options?
<v-btn class="mx-2"
fab
dark
color="{toggleEdit ? primary : secondary}"
@@click.stop="toggleEdit = !toggleEdit">
<v-icon v-if="toggleEdit" dark>mdi-pencil</v-icon>
<v-icon v-else dark>mdi-check</v-icon>
</v-btn>
and
<v-btn class="mx-2"
fab
dark
color="{toggleEdit ? 'var(--primary)' : 'var(--secondary)'}"
@@click.stop="toggleEdit = !toggleEdit">
<v-icon v-if="toggleEdit" dark>mdi-pencil</v-icon>
<v-icon v-else dark>mdi-check</v-icon>
</v-btn>