Skip to content

Commit

Permalink
fix: Move chevron out of transit leg summary when there's nothing to …
Browse files Browse the repository at this point in the history
…expand/collapse
  • Loading branch information
joshlarson committed Dec 18, 2024
1 parent 717c64c commit f712a73
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/dotcom_web/components/trip_planner/transit_leg.ex
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@ defmodule DotcomWeb.Components.TripPlanner.TransitLeg do
</div>
<% else %>
<details class="w-full my-3 group/stops">
<summary>
<summary class="cursor-pointer">
<.leg_summary leg={@leg} alerts={@alerts.route} />
<div class="ml-auto w-4 h-4">
<.icon
name="chevron-down"
class="w-4 h-4 fill=brand-primary group-open/stops:rotate-180"
/>
</div>
</summary>
<.leg_details leg={@leg} />
</details>
Expand Down Expand Up @@ -157,7 +163,7 @@ defmodule DotcomWeb.Components.TripPlanner.TransitLeg do
|> assign(:headsign, headsign(assigns.leg.mode))

~H"""
<div class="flex items-start gap-1.5 cursor-pointer">
<div class="flex items-start gap-1.5">
<div class="min-h-6 min-w-6">
<.route_symbol route={@leg.mode.route} />
</div>
Expand All @@ -172,9 +178,6 @@ defmodule DotcomWeb.Components.TripPlanner.TransitLeg do
</span>
<.alert :for={alert <- @alerts} alert={alert} />
</div>
<div class="ml-auto w-4 h-4">
<.icon name="chevron-down" class="w-4 h-4 fill=brand-primary group-open/stops:rotate-180" />
</div>
</div>
"""
end
Expand Down

0 comments on commit f712a73

Please sign in to comment.