A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal
blob: 3b7694ff1ce9b5b6c25ac884f42bb6694e87fd32 (1054 bytes)[doc][blame][raw]
1
import VIcon from './icon.js';3
const TYPES = {};5
export default {6
props: ['text', 'icon', 'title', 'active', 'animation'],7
emits: ['click'],8
components: {9
VIcon10
},11
template: `12
<button13
@click="$emit('click')"14
:title="title"15
:class="{ 'bg-zinc-900': active }"16
class="group min-w-[50px] h-[50px] hover:bg-white rounded-full inline-flex justify-center items-center cursor-pointer transition-colors outline-none"17
>18
<v-icon19
v-if="icon"20
:id="icon"21
:class="[ active ? 'bg-gray-100' : 'bg-gray-400', animation ]"22
></v-icon>23
<slot v-else></slot>24
<p25
v-if="text"26
:class="[ active ? 'text-gray-100' : 'text-gray-400' ]"27
class="group-hover:text-gray-700 transition-colors -ml-[6px] pr-4 font-medium overflow-hidden text-ellipsis whitespace-nowrap"28
>29
{{text}}30
</p>31
</button>32
`33
}