From 7efae0875c9145b528d5243af29ab18599c7d5c1 Mon Sep 17 00:00:00 2001 From: Cristen Jones Date: Fri, 27 Dec 2024 00:03:53 -0500 Subject: [PATCH] another button! --- .../trip_planner/itinerary_detail.ex | 31 ++++--------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/lib/dotcom_web/components/trip_planner/itinerary_detail.ex b/lib/dotcom_web/components/trip_planner/itinerary_detail.ex index f27f1f9ec0..0b667781db 100644 --- a/lib/dotcom_web/components/trip_planner/itinerary_detail.ex +++ b/lib/dotcom_web/components/trip_planner/itinerary_detail.ex @@ -38,41 +38,22 @@ defmodule DotcomWeb.Components.TripPlanner.ItineraryDetail do
1}>

Depart at

- <.depart_at_button + <.button :for={{itinerary, index} <- Enum.with_index(@itineraries)} - active={@itinerary_selection == index} + type="button" + class={if(@itinerary_selection == index, do: "bg-brand-primary-lightest")} + size="small" + variant="secondary" phx-click="select_itinerary" phx-value-index={index} > {Timex.format!(itinerary.start, "%-I:%M%p", :strftime)} - +
""" end - attr :active, :boolean - attr :rest, :global - slot :inner_block - - defp depart_at_button(%{active: active} = assigns) do - background_class = if active, do: "bg-brand-primary-lightest", else: "bg-transparent" - assigns = assign(assigns, :background_class, background_class) - - ~H""" - - """ - end - defp specific_itinerary_detail(assigns) do assigns = assigns