From 1e5cf2888be2485d9d56d059ea1c1c2070b44707 Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 26 Nov 2020 20:19:45 +0530 Subject: display active para length --- src/Views.elm | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/Views.elm') diff --git a/src/Views.elm b/src/Views.elm index 3a8afed..b74bf98 100644 --- a/src/Views.elm +++ b/src/Views.elm @@ -101,8 +101,8 @@ viewAccuracy model = accuracy -viewWordLengthOptions : Html Msg -viewWordLengthOptions = +viewWordLengthOptions : Base.Config -> Html Msg +viewWordLengthOptions config = let wl = [ 10, 25, 50, 100 ] @@ -117,8 +117,18 @@ viewWordLengthOptions = ] (List.map (\len -> - li [ css [ display inline ] ] - [ styledButton [ onClick (Base.WordLengthChanged len) ] + li + [ css [ display inline ] ] + [ styledButton + [ onClick (Base.WordLengthChanged len) + , css <| + List.singleton <| + if config.length == len then + textDecoration underline + + else + textDecoration Css.none + ] [ text <| String.fromInt len ] ] ) -- cgit v1.2.3