refs #6416 feat: VnBtn

This commit is contained in:
Javier Segarra 2023-11-08 04:09:24 +01:00
parent dfc727e813
commit 9b0613a557
1 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,33 @@
<script setup>
import { useI18n } from 'vue-i18n';
const $props = defineProps({
class: { type: String, require: true, default: null },
padding: { type: String, require: true, default: null },
color: { type: String, require: true, default: null },
icon: { type: String, require: true, default: null },
promise: { type: Function, require: true, default: null },
});
const { t } = useI18n();
async function onClick() {
if ($props.promise) return await $props.promise();
}
</script>
<template>
<QBtn
:class="$props.class"
:padding="$props.padding"
:icon="$props.icon"
flat
:color="$props.color"
round
@click="onClick()"
>
<QTooltip>
<slot name="tooltip">
{{ t('components.smartCard.downloadFile') }}
</slot></QTooltip
>
</QBtn>
</template>
<style lang="scss" scoped></style>