Skip to content

Commit

Permalink
fix: Add shrink-0 to icons
Browse files Browse the repository at this point in the history
  • Loading branch information
joshlarson committed Dec 18, 2024
1 parent 2a4cfb0 commit ebf9f43
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
24 changes: 10 additions & 14 deletions lib/dotcom_web/components/trip_planner/transit_leg.ex
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,13 @@ defmodule DotcomWeb.Components.TripPlanner.TransitLeg do
</div>
<% else %>
<details class="w-full my-3 group/stops">
<summary class="cursor-pointer">
<summary class="flex items-start 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>
<.icon
name="chevron-down"
class="ml-auto shrink-0 w-4 h-4 fill=brand-primary group-open/stops:rotate-180"
/>
</summary>
<.leg_details leg={@leg} />
</details>
Expand Down Expand Up @@ -92,9 +91,8 @@ defmodule DotcomWeb.Components.TripPlanner.TransitLeg do
url={stop_url(@route, @place.stop)}
>
<:icon>
<div class="h-5 w-5">
<.transit_leg_icon route={@route} />
</div>
<.transit_leg_icon route={@route} />
<div :if={@show_leg_line} class={["w-1 flex-grow", leg_line_class(@route)]}></div>
</:icon>
</.place>
Expand Down Expand Up @@ -143,7 +141,7 @@ defmodule DotcomWeb.Components.TripPlanner.TransitLeg do
assigns = assigns |> assign(:name, name)

~H"""
<.icon type="icon-svg" class="h-5 w-5" name={@name} />
<.icon type="icon-svg" class="shrink-0 h-5 w-5" name={@name} />
"""
end

Expand Down Expand Up @@ -175,9 +173,7 @@ defmodule DotcomWeb.Components.TripPlanner.TransitLeg do

~H"""
<div class="flex items-start gap-1.5">
<div class="min-h-6 min-w-6">
<.route_symbol route={@leg.mode.route} />
</div>
<.route_symbol class="shrink-0" route={@leg.mode.route} />
<div class="flex flex-col">
<span class="font-bold">{@headsign}</span>
Expand Down
4 changes: 2 additions & 2 deletions lib/dotcom_web/components/trip_planner/walking_leg.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ defmodule DotcomWeb.Components.TripPlanner.WalkingLeg do
<details class="border-y border-x-0 border-gray-lightest my-3 w-full group">
<summary class="flex w-full gap-x-3.5 py-3">
<.icon name="person-walking" class="w-4 h-6 fill-black" />
<.icon name="person-walking" class="shrink-0 w-4 h-6 fill-black" />
<div class="flex flex-col text-sm">
<div class="font-medium">Walk</div>
<div>
Expand All @@ -42,7 +42,7 @@ defmodule DotcomWeb.Components.TripPlanner.WalkingLeg do
</div>
<.icon
name="chevron-down"
class="ml-auto w-4 h-4 fill=brand-primary group-open:rotate-180"
class="ml-auto shrink-0 w-4 h-4 fill=brand-primary group-open:rotate-180"
/>
</summary>
<.list class="m-0">
Expand Down

0 comments on commit ebf9f43

Please sign in to comment.