1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-01-15 21:18:41 +00:00
bramw_baserow/web-frontend/modules/dashboard/components/CreateWidgetButton.vue
2024-12-25 08:40:24 +00:00

34 lines
729 B
Vue

<template>
<div class="create-widget-button">
<CreateWidgetModal
ref="createWidgetModal"
:dashboard="dashboard"
@widget-type-selected="$emit('widget-type-selected', $event)"
/>
<ButtonFloating
icon="iconoir-plus"
type="secondary"
@click="openCreateWidgetModal"
></ButtonFloating>
</div>
</template>
<script>
import CreateWidgetModal from '@baserow/modules/dashboard/components/CreateWidgetModal'
export default {
name: 'CreateWidgetButton',
components: { CreateWidgetModal },
props: {
dashboard: {
type: Object,
required: true,
},
},
methods: {
openCreateWidgetModal() {
this.$refs.createWidgetModal.show()
},
},
}
</script>