Skip to content

Commit

Permalink
Clean up doc strings a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgastako committed Nov 9, 2016
1 parent fa32f91 commit 2983cb3
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/Select.elm
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
module Select exposing (from, from')

{-| This module provides the `Select.from` helper make working with `select`
elements from Elm easier.
{-| This module provides the `from` (and more flexible `from'`) helpers to make
working with `select` elements in Elm easier.
[See full examples in github](https://github.com/lgastako/elm-select/blob/master/src/Main.elm)
# Helpers
@docs from, from'
Expand All @@ -19,9 +21,9 @@ into a `select` element which contains as it's values the list of values.
from [North, South, East, West] Direction
would produce a select element with box option values and labels being the
string versions of four cardinal directions which would send messages
like (Direction North) or (Direction East) when the user selects new directions
from the drop down.
string versions of four cardinal directions and which would send messages like
`Direction North` or `Direction East` when the user selects new directions from
the drop down.
-}
from : List a -> (a -> msg) -> Html msg
Expand All @@ -34,10 +36,12 @@ into a `select` element which contains as it's values the list of values.
from' [North, South, East, West] Direction toId toLabel
would produce a select element with box option values and labels being decided
by the `toId` and `toLabel` functions, which would send messages
like (Direction North) or (Direction East) when the user selects new directions
from the drop down.
like the `from` example above, this would produce a select element with box
option values and labels being derived from the four cardinal directions and
which would send messages like `Direction North` or `Direction East` when the
user selects new directions from the drop down only the ids and labels would be
derived using the `toId` and `toLabel` functions provided instead of defaulting
to `toString` like `from`.
-}
from' : List a -> (a -> msg) -> (a -> String) -> (a -> String) -> Html msg
Expand Down

0 comments on commit 2983cb3

Please sign in to comment.