-
-
Save cursosdesarrolloweb/e1a64e2df18119864614a79f99985c4c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script setup> | |
import { ref } from 'vue' | |
const color = ref('red') | |
</script> | |
<template> | |
<button @click="color = color === 'red' ? 'green' : 'red'"> | |
Color is: {{ color }} | |
</button> | |
</template> | |
<style scoped> | |
button { | |
color: v-bind(color); | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment