2
0
mirror of https://github.com/frappe/books.git synced 2025-02-11 08:28:47 +00:00
books/src/components/DropdownWithActions.vue
2022-05-23 16:18:22 +05:30

39 lines
748 B
Vue

<template>
<Dropdown
v-if="actions && actions.length"
class="text-xs"
:items="actions"
right
>
<template v-slot="{ toggleDropdown }">
<Button
class="text-gray-900"
:type="type"
:icon="true"
@click="toggleDropdown()"
>
<slot>
<feather-icon name="more-horizontal" class="w-4 h-4" />
</slot>
</Button>
</template>
</Dropdown>
</template>
<script>
import Button from 'src/components/Button';
import Dropdown from 'src/components/Dropdown';
export default {
name: 'DropdownWithActions',
props: {
actions: { default: [] },
type: { type: String, default: 'secondary' },
},
components: {
Dropdown,
Button,
},
};
</script>