1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-23 23:29:41 +02:00

TheButton global component (#425)

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden 2021-05-24 10:12:46 -08:00 committed by GitHub
parent fd1b54ae70
commit 034a21e203
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 283 additions and 175 deletions

View file

@ -1,22 +1,21 @@
<template>
<div @click="$emit('click')">
<v-img
:height="height"
v-if="!fallBackImage"
:src="getImage(slug)"
@load="fallBackImage = false"
@error="fallBackImage = true"
>
<v-img
@click="$emit('click')"
:height="height"
v-if="!fallBackImage"
:src="getImage(slug)"
@load="fallBackImage = false"
@error="fallBackImage = true"
>
<slot> </slot>
</v-img>
<div class="icon-slot" v-else @click="$emit('click')">
<div>
<slot> </slot>
</v-img>
<div class="icon-slot" v-else>
<div>
<slot> </slot>
</div>
<v-icon color="primary" class="icon-position" :size="iconSize">
{{ $globals.icons.primary }}
</v-icon>
</div>
<v-icon color="primary" class="icon-position" :size="iconSize">
{{ $globals.icons.primary }}
</v-icon>
</div>
</template>