so://phie

verbal

A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal

blob: b854b908f36b3e060d3f1ad229b8b0efd870dda1 (1202 bytes)[doc][blame][raw]

1import VIcon from './icon.js';

2

3const TYPES = {};

4

5export default {

6 props: ['text', 'icon', 'title', 'active', 'animation', 'size'],

7 emits: ['click'],

8 components: {

9 VIcon

10 },

11 template: `

12 <button

13 @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-icon

19 v-if="icon"

20 :id="icon"

21 :size="size"

22 :class="[ active ? 'text-gray-100' : 'text-gray-400', text ? 'group-hover:text-gray-700' : '', animation, text ? '' : 'w-full' ]"

23 class="hover:text-gray-800"

24 ></v-icon>

25 <slot v-else></slot>

26 <p

27 v-if="text"

28 :class="[ active ? 'text-gray-100' : 'text-gray-400' ]"

29 class="group-hover:text-gray-800 transition-colors -ml-[6px] pr-4 font-medium overflow-hidden text-ellipsis whitespace-nowrap"

30 >

31 {{text}}

32 </p>

33 </button>

34 `

35}