2021-03-20 07:38:56 +00:00
|
|
|
<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>
|
2021-05-06 14:31:26 +00:00
|
|
|
.dropdown-menu__item {
|
|
|
|
list-style: none;
|
2021-03-20 07:38:56 +00:00
|
|
|
|
2021-05-06 14:31:26 +00:00
|
|
|
::v-deep {
|
|
|
|
a,
|
|
|
|
.button {
|
|
|
|
width: 100%;
|
|
|
|
text-align: left;
|
|
|
|
white-space: nowrap;
|
2021-05-20 08:21:46 +00:00
|
|
|
display: inline-flex;
|
|
|
|
border-radius: var(--border-radius-normal);
|
2021-05-06 14:31:26 +00:00
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background: var(--color-background);
|
|
|
|
}
|
2021-03-20 07:38:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|