mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-19 19:51:37 +03:00
Start writing the generated Menu code
This commit is contained in:
parent
935d4ca950
commit
141a2a84e6
@ -84,8 +84,24 @@ view state =
|
||||
, settings = state.settings
|
||||
, toExampleCode =
|
||||
\settings ->
|
||||
-- TODO: generate code
|
||||
[]
|
||||
let
|
||||
toCode buttonCode =
|
||||
moduleName
|
||||
++ ".view"
|
||||
++ ControlView.codeFromList settings.menuAttributes
|
||||
++ ("\n\t{ button = " ++ buttonCode)
|
||||
++ "\n\t, entries = []"
|
||||
++ "\n\t, isOpen = True"
|
||||
++ "\n\t, focusAndToggle = FocusAndToggle"
|
||||
++ "\n\t}"
|
||||
in
|
||||
[ { sectionName = "Menu.button"
|
||||
, code = toCode "TODO: button code"
|
||||
}
|
||||
, { sectionName = "Menu.custom"
|
||||
, code = toCode "TODO: button code"
|
||||
}
|
||||
]
|
||||
}
|
||||
, viewExamples
|
||||
[ ( "Menu.button"
|
||||
|
Loading…
Reference in New Issue
Block a user