mirror of
https://github.com/frappe/books.git
synced 2025-01-11 02:36:14 +00:00
Add dropdown component
This commit is contained in:
parent
bb39c74a7a
commit
9d04077014
19
ui/components/Dropdown.vue
Normal file
19
ui/components/Dropdown.vue
Normal file
@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<div class="dropdown show">
|
||||
<a class="btn btn-sm btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{label}}
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuLink">
|
||||
<a class="dropdown-item" v-for="option in options" :key="option.label" @click="option.handler">{{option.label}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: ['label', 'options']
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user