Chatwoot/app/javascript/shared/components/ui/dropdown/DropdownItem.vue
Sivin Varghese c523a953f7
feat: Adds keyboard shortcuts for conversation actions (#2672)
* feat: Adds keyboard shortcuts for conversation actions

* Minor fixes

* Minor fixes

* Minor fixes and add new shortcut

* MInor fixes

* Review fixes

* Minor fixes

* Code cleanup

* Minor fixes

* Uses Alt or Option key instead of shift-key

* Review fixes

* Review fixes

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-08-09 00:38:52 -07:00

52 lines
873 B
Vue

<template>
<li
class="dropdown-menu__item"
:class="{
'is-disabled': disabled,
}"
:tabindex="disabled ? null : -1"
:aria-disabled="disabled"
>
<slot></slot>
</li>
</template>
<script>
export default {
name: 'WootDropdownItem',
componentName: 'WootDropdownMenu',
props: {
disabled: {
type: Boolean,
default: false,
},
className: {
type: String,
default: '',
},
},
};
</script>
<style lang="scss" scoped>
.dropdown-menu__item {
list-style: none;
::v-deep {
a,
.button {
width: 100%;
text-align: left;
white-space: nowrap;
display: inline-flex;
border-radius: var(--border-radius-normal);
&:hover {
background: var(--color-background);
}
&:focus {
background: var(--color-background);
}
}
}
}
</style>