Files
FEDEO/components/mobile/FloatingActionButton.vue
2025-03-27 20:36:08 +01:00

47 lines
706 B
Vue

<script setup>
const props = defineProps({
label: {
type: String,
required: true,
},
icon: {
type: String,
},
variant: {
type: String,
default: 'solid'
},
color: {
type: String,
default: 'primary'
},
pos: {
type: Number,
default: 0
}
})
const emit = defineEmits(['click'])
</script>
<template>
<UButton
id="fab"
:icon="props.icon"
:label="props.label"
:variant="props.variant"
:color="props.color"
@click="emit('click')"
:style="`bottom: ${10 + props.pos * 5}vh;`"
class="bg-white dark:bg-gray-950"
/>
</template>
<style scoped>
#fab {
position: fixed;
right: 15px;
z-index: 5;
}
</style>