Adds Style control

This commit is contained in:
Tessa Kelly 2022-03-23 11:10:18 -07:00
parent 235cec46ea
commit 067e4f8155

View File

@ -88,9 +88,29 @@ init =
ControlExtra.list
|> CommonControls.css { moduleName = "Heading", use = Heading.css }
|> ControlExtra.optionalBoolListItem "error" ( "Heading.error", Heading.error )
|> ControlExtra.optionalListItem "style" controlStyle
}
controlStyle : Control ( String, Heading.Attribute msg )
controlStyle =
[ ( "Top", Heading.Top )
, ( "Tagline", Heading.Tagline )
, ( "Subhead", Heading.Subhead )
, ( "Small", Heading.Small )
]
|> List.map
(\( name, val ) ->
( name
, Control.value
( "Heading.style Heading." ++ name
, Heading.style val
)
)
)
|> Control.choice
type alias Settings =
List ( String, Heading.Attribute Msg )