Name: purescript-halogen-menu
Owner: SlamData, Inc.
Description: null
Created: 2015-10-29 22:58:42.0
Updated: 2018-04-25 14:14:39.0
Pushed: 2017-04-24 11:19:37.0
Homepage: null
Size: 38
Language: PureScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A reusable halogen component that presents an interactive menu.
Menus are rendered as unordered lists of submenus which can be selected and dismissed. Selected submenus are also rendered as unordered lists.
Here is an example of a rendered menu with the first submenu selected.
<li><button>Color</button><ul><li><button>Load color</button></li><li><button>Save color</button></li></ul></li><li><div><button>Edit</button></div></li></ul>
purescript-halogen-menu
purescript-markdown-halogen
using bower: bower i purescript-markdown-halogen --save
.Halogen.Menu.Model (Menu(), mkMenu)
.ColorQuery Unit
with the type you defined in the previous step.Halogen.Menu.Component (MenuP(), MenuQueryP(), SubmenuSlotAddress(), menuComponent)
.onclick
events are triggered outside of a menu componentHalogen.Menu.Query (MenuQuery(..))
.DismissSubmenu
action as in this example.Halogen.Menu.Submenu.Query (SubmenuQuery(..))
.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.ul
s, li
s and button
s in your menu using the class or id you defined previously as a root element as in this example.Module documentation is published on Pursuit.
An example Halogen application which uses purescript-halogen-menu
is available here.