2019-12-20 12:14:31 +05:30
|
|
|
<template>
|
|
|
|
<Dropdown
|
|
|
|
v-if="actions && actions.length"
|
|
|
|
class="text-xs"
|
|
|
|
:items="actions"
|
|
|
|
right
|
|
|
|
>
|
|
|
|
<template v-slot="{ toggleDropdown }">
|
2021-12-21 11:38:31 +05:30
|
|
|
<Button
|
|
|
|
class="text-gray-900"
|
|
|
|
:type="type"
|
|
|
|
:icon="true"
|
|
|
|
@click="toggleDropdown()"
|
|
|
|
>
|
|
|
|
<slot>
|
|
|
|
<feather-icon name="more-horizontal" class="w-4 h-4" />
|
|
|
|
</slot>
|
2019-12-20 12:14:31 +05:30
|
|
|
</Button>
|
|
|
|
</template>
|
|
|
|
</Dropdown>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2022-04-20 12:08:47 +05:30
|
|
|
import Button from 'src/components/Button';
|
|
|
|
import Dropdown from 'src/components/Dropdown';
|
2019-12-20 12:14:31 +05:30
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'DropdownWithActions',
|
2021-12-21 11:38:31 +05:30
|
|
|
props: {
|
|
|
|
actions: { default: [] },
|
|
|
|
type: { type: String, default: 'secondary' },
|
|
|
|
},
|
2019-12-20 12:14:31 +05:30
|
|
|
components: {
|
|
|
|
Dropdown,
|
2021-12-21 11:38:31 +05:30
|
|
|
Button,
|
|
|
|
},
|
2019-12-20 12:14:31 +05:30
|
|
|
};
|
|
|
|
</script>
|