style: fix styling

This commit is contained in:
carla 2026-02-11 13:55:02 +01:00
parent f6b35f03a5
commit fd1f4d02d5
4 changed files with 9 additions and 17 deletions

View file

@ -352,7 +352,7 @@ defmodule Mv.Membership.MemberExport.Build do
%{ %{
key: to_string(id), key: to_string(id),
kind: :custom_field, kind: :custom_field,
label: label_fn.(id), label: cf.name,
custom_field: cf custom_field: cf
} }
else else

View file

@ -542,7 +542,7 @@ defmodule MvWeb.CoreComponents do
{render_slot(@subtitle)} {render_slot(@subtitle)}
</p> </p>
</div> </div>
<div class="flex-none">{render_slot(@actions)}</div> <div class="flex gap-4 justify-end">{render_slot(@actions)}</div>
</header> </header>
""" """
end end

View file

@ -35,7 +35,7 @@ defmodule MvWeb.Components.ExportDropdown do
assigns = assign(assigns, :button_label, button_label) assigns = assign(assigns, :button_label, button_label)
~H""" ~H"""
<div id={@id} data-testid="export-dropdown"> <div id={@id} data-testid="export-dropdown" class="flex-auto flex-wrap">
<.dropdown_menu <.dropdown_menu
id={"#{@id}-menu"} id={"#{@id}-menu"}
button_label={@button_label} button_label={@button_label}

View file

@ -2,20 +2,12 @@
<.header> <.header>
{gettext("Members")} {gettext("Members")}
<:actions> <:actions>
<form method="post" action={~p"/members/export.csv"} target="_blank" class="inline"> <.live_component
<input type="hidden" name="_csrf_token" value={Plug.CSRFProtection.get_csrf_token()} /> module={MvWeb.Components.ExportDropdown}
<input type="hidden" name="payload" value={@export_payload_json} /> id="export-dropdown"
<button export_payload_json={@export_payload_json}
type="submit" selected_count={@selected_count}
class="btn btn-secondary gap-2" />
aria-label={gettext("Export members to CSV")}
>
<.icon name="hero-arrow-down-tray" />
{gettext("Export to CSV")} ({if @selected_count == 0,
do: gettext("all"),
else: @selected_count})
</button>
</form>
<.button <.button
class="secondary" class="secondary"
id="copy-emails-btn" id="copy-emails-btn"