2024-08-07 14:35:49 +07:00
|
|
|
<script lang="ts" setup>
|
2024-08-08 11:33:28 +07:00
|
|
|
import MainButton from './MainButton.vue';
|
2024-08-07 14:35:49 +07:00
|
|
|
|
|
|
|
|
defineEmits<{
|
|
|
|
|
(e: 'click', v: MouseEvent): void;
|
|
|
|
|
}>();
|
|
|
|
|
defineProps<{
|
2024-08-08 11:09:45 +07:00
|
|
|
iconOnly?: boolean;
|
2024-08-07 14:35:49 +07:00
|
|
|
solid?: boolean;
|
|
|
|
|
outlined?: boolean;
|
|
|
|
|
disabled?: boolean;
|
|
|
|
|
dark?: boolean;
|
2024-08-16 15:31:49 +07:00
|
|
|
|
2024-08-26 16:24:08 +07:00
|
|
|
label?: string;
|
2024-09-23 15:03:54 +07:00
|
|
|
icon?: string;
|
2024-08-26 16:24:08 +07:00
|
|
|
|
2024-08-16 15:31:49 +07:00
|
|
|
amount?: number;
|
2024-08-07 14:35:49 +07:00
|
|
|
}>();
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2024-08-08 11:33:28 +07:00
|
|
|
<MainButton
|
2024-08-07 15:01:14 +07:00
|
|
|
@click="(e) => $emit('click', e)"
|
2024-08-08 11:33:28 +07:00
|
|
|
v-bind="{ ...$props, ...$attrs }"
|
2024-09-23 15:03:54 +07:00
|
|
|
:icon="icon || 'mdi-content-save-outline'"
|
2024-08-08 04:59:45 +00:00
|
|
|
color="207 96% 32%"
|
2024-08-26 16:24:08 +07:00
|
|
|
:title="iconOnly ? $t('general.save') : undefined"
|
2024-08-07 14:35:49 +07:00
|
|
|
>
|
2024-08-26 16:24:08 +07:00
|
|
|
{{ label || $t('general.save') }}
|
|
|
|
|
{{ amount && amount > 0 ? `(${amount})` : '' }}
|
2024-08-08 11:33:28 +07:00
|
|
|
</MainButton>
|
2024-08-07 14:35:49 +07:00
|
|
|
</template>
|