Skip to content

Commit

Permalink
add boundEdge prop to ButtonDropdownMenu.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
SebinSong committed Dec 12, 2024
1 parent e4e1f9b commit 6bab7be
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion frontend/views/components/ButtonDropdownMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ menu-parent.c-menu(v-on='listeners')
| {{ buttonText }}
i.icon-angle-down.is-suffix

menu-content.c-menu-content
menu-content.c-menu-content(:class='"bound-to-" + boundEdge')
ul
template(v-if='options')
component(
Expand Down Expand Up @@ -42,6 +42,11 @@ export default ({
* - An item to be mapped to a 'menu-header' component:
* { type: 'header', name: string }
*/
},
boundEdge: {
type: String,
default: 'right',
validator: val => ['left', 'right'].includes(val)
}
},
methods: {
Expand Down Expand Up @@ -97,6 +102,11 @@ export default ({
left: unset;
right: 0;
&.bound-to-left {
left: 0;
right: unset;
}
::v-deep .c-header {
font: {
size: $size_5;
Expand Down
1 change: 1 addition & 0 deletions frontend/views/containers/proposals/ProposalsWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ component(
:buttonText='L("Create proposal")'
:options='proposalOptions'
@select='onDropdownItemSelect'
boundEdge='left'
)

ul.c-proposals(v-if='hasProposals' data-test='proposalsWidget')
Expand Down

0 comments on commit 6bab7be

Please sign in to comment.