Merge branch 'fix-stars'
This commit is contained in:
commit
0c13530233
|
@ -17,7 +17,7 @@
|
|||
</div>
|
||||
|
||||
<div class="flex-none w-1/6 text-right">
|
||||
<star-toggle :application="application"></star-toggle>
|
||||
<star-toggle :application="application" :starred="starred" @toggle="starred = !starred"></star-toggle>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -40,7 +40,7 @@
|
|||
</div>
|
||||
|
||||
<div class="px-2">
|
||||
<star-toggle :application="application"></star-toggle>
|
||||
<star-toggle :application="application" :starred="starred" @toggle="starred = !starred"></star-toggle>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<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']">
|
||||
<button type="button" @click="$emit('toggle')" 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>
|
||||
|
@ -8,12 +8,10 @@
|
|||
<script>
|
||||
export default {
|
||||
props: {
|
||||
application: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
starred: false
|
||||
application: Object,
|
||||
starred: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue