Use `dropdown` instead of `btn-group` for dropdowns

This commit is contained in:
Andreas Nedbal 2024-02-28 21:51:18 +01:00 committed by Andreas Nedbal
parent 5077039035
commit 22886934db
2 changed files with 5 additions and 5 deletions

View File

@ -6,12 +6,12 @@
%button.btn.btn-link.answerbox__action{ type: :button, name: "ab-comments", data: { a_id: a.id, state: :hidden, selection_hotkey: "x" } } %button.btn.btn-link.answerbox__action{ type: :button, name: "ab-comments", data: { a_id: a.id, state: :hidden, selection_hotkey: "x" } }
%i.fa.fa-fw.fa-comments %i.fa.fa-fw.fa-comments
%span{ id: "ab-comment-count-#{a.id}" }= a.comment_count %span{ id: "ab-comment-count-#{a.id}" }= a.comment_count
.btn-group .dropdown.d-inline
%button.btn.btn-link.answerbox__action{ data: { bs_toggle: :dropdown }, aria: { expanded: false } } %button.btn.btn-link.answerbox__action{ data: { bs_toggle: :dropdown }, aria: { expanded: false } }
%i.fa.fa-fw.fa-share-alt{ title: t(".share.title") } %i.fa.fa-fw.fa-share-alt{ title: t(".share.title") }
= render "actions/share", answer: a = render "actions/share", answer: a
- if user_signed_in? - if user_signed_in?
.btn-group .dropdown.d-inline
%button.btn.btn-default.btn-sm.dropdown-toggle{ data: { bs_toggle: :dropdown }, aria: { expanded: false } } %button.btn.btn-link.answerbox__action.dropdown-toggle{ data: { bs_toggle: :dropdown }, aria: { expanded: false } }
%span.caret %span.caret
= render "actions/answer", answer: a = render "actions/answer", answer: a

View File

@ -20,7 +20,7 @@
= render "reactions/destroy", type: "Comment", target: comment = render "reactions/destroy", type: "Comment", target: comment
- else - else
= render "reactions/create", type: "Comment", target: comment = render "reactions/create", type: "Comment", target: comment
.btn-group .dropdown.d-inline
%button.btn.btn-link.btn-sm.dropdown-toggle{ data: { bs_toggle: :dropdown }, aria: { expanded: false } } %button.btn.btn-link.answerbox__action.dropdown-toggle{ data: { bs_toggle: :dropdown }, aria: { expanded: false } }
%span.caret %span.caret
= render "actions/comment", comment: comment, answer: a = render "actions/comment", comment: comment, answer: a