so://phie

verbal

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]

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

2

3const TYPES = {};

4

5export default {

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

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 :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 <p

26 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}