You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 17, 2020. It is now read-only.
Define a type synonym for your menu's state and queries using the query or other data type you defined above as in this example.
Use these type synonyms and slot address type to redefine the child state, child query and child slot address type synonyms for your parent component as in this example.
Install your menu into your parent component inside of an element with a class or id as in this example.
Dismissing submenus when onclick events are triggered outside of a menu component
Import Halogen.Menu.Query (MenuQuery(..)).
Define a non propogating and default preventing action which is triggered by the onclick event of the root element of your application as in this example.
Define the evaluation of this action such that it queries your menu component with the DismissSubmenu action as in this example.
Define a peek function for your parent component which transforms the SelectSubmenuItem query containing the values you have specified into the operations you wish to perform. In this example this is routing a query to another component.
Styling a menu
Use the included template to define styling for the uls, lis and buttons in your menu using the class or id you defined previously as a root element as in this example.