-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathButton.vue
More file actions
39 lines (33 loc) · 913 Bytes
/
Button.vue
File metadata and controls
39 lines (33 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<template>
<Component :is="menuComponent">
<template #activator="{ props }">
<VBtn v-bind="props" variant="tonal" color="error">
<VIcon icon="mdi-alert-circle-outline" size="x-large"></VIcon>
</VBtn>
</template>
<DialogError :error="error"></DialogError>
</Component>
</template>
<script setup lang="ts">
import { computed } from "vue";
import { useDisplay } from "vuetify";
import { VBottomSheet } from "vuetify/components/VBottomSheet";
import { VMenu } from "vuetify/components/VMenu";
import DialogError from "./Dialog.vue";
interface Props {
error: Error;
}
defineProps<Props>();
const { mobile } = useDisplay();
const menuComponent = computed(() => (mobile.value ? VBottomSheet : VMenu));
</script>
<style scoped>
.v-bottom-sheet .dialog {
border-radius: 0 !important;
padding: 4px 4px 24px 4px;
}
.v-menu .dialog {
width: 290px;
padding: 4px;
}
</style>