aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/LoggedIn/Home/View/Search.elm
blob: 62db1b2f6cce09d4dbb0ece40ffcd4b4142fb2ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
module LoggedIn.Home.View.Search exposing
  ( paymentsSearch
  )

import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Html.App as Html

import Form exposing (Form)
import View.Form as Form

import Msg exposing (Msg)
import LoggedIn.Msg as LoggedInMsg
import LoggedIn.Home.Msg as HomeMsg

import LoggedData exposing (LoggedData)
import LoggedIn.Home.Model as HomeModel
import Model.Translations exposing (getMessage)

paymentsSearch : LoggedData -> HomeModel.Model -> Html Msg
paymentsSearch loggedData { search } =
  let htmlMap = Html.map (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.SearchMsg)
  in  Html.div
        [ class "search" ]
        [ Form.textInput loggedData.translations search htmlMap "searchText" ]