mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-09-11 15:55:54 +03:00
List demo improvements
This commit is contained in:
parent
361046b203
commit
0faa130f13
@ -54,11 +54,11 @@ listDrawElement sel i =
|
||||
let selStr s = if sel
|
||||
then withAttrName customAttr (str $ "<" <> s <> ">")
|
||||
else str s
|
||||
in hCenterWith (Just ' ') $ vBox $ for [1..i+1] $ \j ->
|
||||
"Item " <+> (selStr $ show i) <+> " Line " <+> (str $ show j)
|
||||
in (hCenterWith (Just ' ') $ vBox $ for [1..i+1] $ \j ->
|
||||
"Item " <+> (selStr $ show i) <+> " Line " <+> (str $ show j)) <=> hBorder
|
||||
|
||||
initialState :: List Int
|
||||
initialState = list (Name "list") listDrawElement [1, 2, 3]
|
||||
initialState = list (Name "list") listDrawElement [0, 1, 2]
|
||||
|
||||
customAttr :: AttrName
|
||||
customAttr = listSelectedAttr <> "custom"
|
||||
|
Loading…
Reference in New Issue
Block a user