aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/LoggedIn/Home/View/Search.elm
blob: a4f727a2f5da69a081a66dbb29867e1181535148 (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
27
28
29
module LoggedIn.Home.View.Search exposing
  ( paymentsSearch
  )

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

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 } =
  Html.div
    [ class "search" ]
    [ span
        [ class "label" ]
        [ text (getMessage "Search" loggedData.translations) ]
    , input
        [ value search
        , onInput (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.UpdateSearch)
        ]
        []
    ]