Chatwoot/app/javascript/shared/components/ui/dropdown/DropdownItem.vue
2022-10-13 13:36:42 -07:00

52 lines
855 B
Vue

<template>
<li
class="dropdown-menu__item"
:class="{
'is-disabled': disabled,
}"
:tabindex="disabled ? null : -1"
:aria-disabled="disabled"
>
<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;
margin-bottom: var(--space-micro);
::v-deep {
a,
.button {
display: inline-flex;
width: 100%;
text-align: left;
color: var(--s-700);
&:hover {
background: var(--color-background);
}
&:focus {
background: var(--color-background);
}
}
}
}
</style>