Skip to content

Commit

Permalink
fix: small batch of fixes (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gladear authored Nov 19, 2024
1 parent a76d1f2 commit bcd8b49
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
7 changes: 7 additions & 0 deletions apps/app_web/assets/css/components/tile.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,11 @@
.tile--neutral .\[custom\]tile__text {
@apply text-neutral-950;
}

/* ## Variants */

.variant\@tile--transfer {
@apply flex-col items-stretch
pr-4;
}
}
5 changes: 2 additions & 3 deletions apps/app_web/lib/app_web/components/filters_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ defmodule AppWeb.FiltersComponents do

def filters(assigns) do
~H"""
<form class="flex gap-4 my-4 overflow-auto" id={@id} phx-hook="Filters" {@rest}>
<form class="flex gap-4 my-4 overflow-auto" id={@id} {@rest}>
<.dropdown :for={filter <- @filters} id={[@id, "_", filter.name]}>
<:trigger :let={attrs}>
<.button kind={:secondary} size={:sm} type="button" {attrs}>
Expand All @@ -68,7 +68,7 @@ defmodule AppWeb.FiltersComponents do
<.list_item :for={{value, label} <- @options}>
<label class="form-control-container justify-between">
<span class="label"><%= label %></span>
<.checkbox name={@name} value={value} checked={value in @default} phx-debounce />
<.checkbox name={[@name, "[]"]} value={value} checked={value in @default} phx-debounce />
</label>
</.list_item>
</.list>
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit bcd8b49

Please sign in to comment.