Start writing the generated Menu code

This commit is contained in:
Tessa Kelly 2022-03-24 14:24:36 -07:00
parent 935d4ca950
commit 141a2a84e6

View File

@ -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"