so://phie

verbal

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

blob: 5cb32e427cbafa41077ecd64e729fc5aa981aebc (1337 bytes)[doc][blame][raw]

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

2

3export default {

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

5 emits: ['click'],

6 components: {

7 VIcon

8 },

9 template: `

10 <button

11 @click="() => disabled ? {} : $emit('click')"

12 :title="title"

13 :class="{ 'bg-zinc-900': active, 'cursor-default': disabled }"

14 class="group min-w-[50px] h-[50px] hover:bg-white rounded-full inline-flex justify-center items-center cursor-pointer transition-colors outline-none"

15 >

16 <v-icon

17 v-if="icon"

18 :id="icon"

19 :size="size"

20 :class="[ active ? 'text-gray-100' : 'text-gray-400', text ? 'group-hover:text-gray-700' : '', animation, text ? 'min-w-[50px]' : 'w-full', disabled ? '!text-gray-700' : '' ]"

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

22 ></v-icon>

23 <slot v-else></slot>

24 <p

25 v-if="text"

26 :class="[ active ? 'text-gray-100' : 'text-gray-400', disabled ? '!text-gray-700' : '' ]"

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

28 >

29 {{text}}

30 </p>

31 </button>

32 `

33}