mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-19 11:41:32 +03:00
Adds Style control
This commit is contained in:
parent
235cec46ea
commit
067e4f8155
@ -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 )
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user