This repository has been archived on 2025-01-07. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
rebuilding-acquia/src/components/Application/StarToggle.vue
2019-04-09 02:27:14 +01:00

20 lines
658 B
Vue

<template>
<button type="button" @click="starred = !starred" class="focus:outline-none" :class="[starred ? 'text-orange-100 hover:text-orange-200 focus:text-orange-200' : 'text-gray-400 focus:text-orange-200 hover:text-orange-100']">
<span class="visuallyhidden">{{ !starred ? 'Star' : 'Unstar' }} {{ application.name }}</span>
<svg class="h-6 w-6 fill-current -mr-1" role="presentation"><use :xlink:href="`/img/icons.symbol.svg#state__${starred ? 'starred' : 'unstarred'}`"></use></svg>
</button>
</template>
<script>
export default {
props: {
application: Object
},
data () {
return {
starred: false
}
}
}
</script>