Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshull committed Dec 5, 2024
1 parent 989b474 commit 15934a1
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/dotcom_web/components/trip_planner/walking_leg.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
defmodule DotcomWeb.Components.TripPlanner.WalkingLeg do
@moduledoc """
A walking leg of a trip.
Includes a summary of the walk (time and distance) and a list of steps.
"""

use Phoenix.Component
Expand All @@ -11,7 +12,17 @@ defmodule DotcomWeb.Components.TripPlanner.WalkingLeg do

alias OpenTripPlannerClient.Schema.Step

attr :leg, :map
@doc """
Renders a walking leg.
Must be given a `leg` with a:
- `distance` (float) in miles
- `duration` (integer) in minutes
- `mode` with a list of `steps` (list of `Step` structs)
- `polyline` (string) to use as the accordion ID
"""

attr :leg, :map, required: true

def walking_leg(assigns) do
~H"""
Expand Down

0 comments on commit 15934a1

Please sign in to comment.