Clean up some UI values

This commit is contained in:
Correl Roush 2020-05-04 15:27:27 -04:00
parent 22436d22f7
commit e48900996b
3 changed files with 17 additions and 14 deletions

View file

@ -84,9 +84,9 @@ layout model =
}
, el
[ centerX
, Background.color UI.red
, Background.color UI.colors.errorBackground
, padding 20
, Font.color UI.white
, Font.color UI.colors.errorForeground
, transparent (model.error == Nothing)
]
<|

View file

@ -212,20 +212,20 @@ viewRoom player room =
navBar : { title : String, playerName : String } -> Element Msg
navBar { title, playerName } =
row
[ Background.color UI.blue
[ Background.color UI.colors.primary
, height (px 50)
, width fill
, padding 10
]
[ el
[ Font.alignLeft
, Font.color UI.white
, Font.color UI.colors.background
, width fill
]
(text title)
, el
[ Font.alignRight
, Font.color UI.white
, Font.color UI.colors.background
]
(text playerName)
]
@ -245,10 +245,10 @@ viewCards selected =
, Border.rounded 10
, Background.color <|
if selected == Just value then
UI.blue
UI.colors.selected
else
UI.white
UI.colors.background
, Font.size 50
]
{ onPress = Just (Vote value)
@ -278,7 +278,6 @@ viewPlayers playerList =
el
[ padding 10
, Font.alignRight
, Background.color UI.lightGrey
]
(text <| Maybe.withDefault " " player.vote)
}

View file

@ -1,13 +1,9 @@
module PlanningPokerUI exposing
( actionButton
, blue
, colors
, fontSizes
, heroText
, lightGrey
, red
, toDocument
, white
)
import Browser exposing (Document)
@ -26,7 +22,10 @@ colors =
, background = white
, selected = primary
, disabled = lightGrey
, error = red
, errorBackground = red
, errorForeground = white
, text = black
, buttonText = white
}
@ -56,6 +55,11 @@ white =
rgb255 255 255 255
black : Color
black =
rgb255 0 0 0
actionButton :
List (Attribute msg)
-> { isActive : Bool, onPress : msg, label : Element msg }
@ -93,7 +97,7 @@ toDocument : { title : String, body : List (Element msg) } -> Document msg
toDocument { title, body } =
{ title = title
, body =
[ layout [ explain Debug.todo ] <|
[ layout [] <|
column [ width fill, height fill, spacing 20 ] body
]
}