A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal
blob: 6ed845445e5e56c1c8fa4ff626626ae74283fbae (1135 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', text ? 'group-hover:bg-gray-700' : '', animation ]"22
class="hover:bg-gray-700"23
></v-icon>24
<slot v-else></slot>25
<p26
v-if="text"27
:class="[ active ? 'text-gray-100' : 'text-gray-400' ]"28
class="group-hover:text-gray-700 transition-colors -ml-[6px] pr-4 font-medium overflow-hidden text-ellipsis whitespace-nowrap"29
>30
{{text}}31
</p>32
</button>33
`34
}