From bcd8b491df4ab4ec9a551072edd1b656fe21b7e6 Mon Sep 17 00:00:00 2001 From: Enzo Date: Tue, 19 Nov 2024 22:33:38 +0100 Subject: [PATCH] fix: small batch of fixes (#310) --- apps/app_web/assets/css/components/tile.css | 7 +++++++ apps/app_web/lib/app_web/components/filters_components.ex | 5 ++--- .../app_web/lib/app_web/components/transfers_components.ex | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/apps/app_web/assets/css/components/tile.css b/apps/app_web/assets/css/components/tile.css index e95a65e5..428cc74e 100644 --- a/apps/app_web/assets/css/components/tile.css +++ b/apps/app_web/assets/css/components/tile.css @@ -77,4 +77,11 @@ .tile--neutral .\[custom\]tile__text { @apply text-neutral-950; } + + /* ## Variants */ + + .variant\@tile--transfer { + @apply flex-col items-stretch + pr-4; + } } diff --git a/apps/app_web/lib/app_web/components/filters_components.ex b/apps/app_web/lib/app_web/components/filters_components.ex index 3b3bc242..f8c3ec2a 100644 --- a/apps/app_web/lib/app_web/components/filters_components.ex +++ b/apps/app_web/lib/app_web/components/filters_components.ex @@ -41,7 +41,7 @@ defmodule AppWeb.FiltersComponents do def filters(assigns) do ~H""" -
+ <.dropdown :for={filter <- @filters} id={[@id, "_", filter.name]}> <:trigger :let={attrs}> <.button kind={:secondary} size={:sm} type="button" {attrs}> @@ -68,7 +68,7 @@ defmodule AppWeb.FiltersComponents do <.list_item :for={{value, label} <- @options}> @@ -108,7 +108,6 @@ defmodule AppWeb.FiltersComponents do opts |> Keyword.validate!([:name, :label, :options, default: [], icon: nil]) |> Keyword.merge(multiple: true) - |> Keyword.update!(:name, &[&1, "[]"]) struct!(__MODULE__, attrs) end diff --git a/apps/app_web/lib/app_web/components/transfers_components.ex b/apps/app_web/lib/app_web/components/transfers_components.ex index 7f686579..ec4615fa 100644 --- a/apps/app_web/lib/app_web/components/transfers_components.ex +++ b/apps/app_web/lib/app_web/components/transfers_components.ex @@ -67,7 +67,7 @@ defmodule AppWeb.TransfersComponents do end defp transfer_tile_classes(transfer) do - ["tile pr-4", transfer_color_class(transfer.type)] + ["tile variant@tile--transfer", transfer_color_class(transfer.type)] end defp transfer_color_class(:payment), do: "tile--red"