From 6bab7be683fc877007d5fc96e41f118898cb4b03 Mon Sep 17 00:00:00 2001 From: SebinSong Date: Thu, 12 Dec 2024 10:07:14 +0900 Subject: [PATCH] add boundEdge prop to ButtonDropdownMenu.vue --- frontend/views/components/ButtonDropdownMenu.vue | 12 +++++++++++- .../views/containers/proposals/ProposalsWidget.vue | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/frontend/views/components/ButtonDropdownMenu.vue b/frontend/views/components/ButtonDropdownMenu.vue index 509dfe9624..f1c301783c 100644 --- a/frontend/views/components/ButtonDropdownMenu.vue +++ b/frontend/views/components/ButtonDropdownMenu.vue @@ -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( @@ -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: { @@ -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; diff --git a/frontend/views/containers/proposals/ProposalsWidget.vue b/frontend/views/containers/proposals/ProposalsWidget.vue index d103fdf3aa..e863d95fa5 100644 --- a/frontend/views/containers/proposals/ProposalsWidget.vue +++ b/frontend/views/containers/proposals/ProposalsWidget.vue @@ -16,6 +16,7 @@ component( :buttonText='L("Create proposal")' :options='proposalOptions' @select='onDropdownItemSelect' + boundEdge='left' ) ul.c-proposals(v-if='hasProposals' data-test='proposalsWidget')