The ClickWrapperUI can be wrapped around any list of ZUI components to provide a clicking function for those components. This is a subclass of DivUI so it displays in the same way. The only difference is that this can be clicked. It is recommended that you provide a style class with a &:hover clause so that it responds in a clickable way.
Parameters
- items:ZUIListF – this is either a list of ZUI components or a function that returns a list of ZUI components. Providing a function allows you to dynamically change the components each time the component is rerendered. See the DivUI component for more details.
Attributes
- .click(onclick:(event:Event)=>void) – the onclick function will be called whenever any of the ZUI components are clicked.
Examples
new ClickWrapperUI([
new TextUI("name:"),
new TextUI( () =>{
return the person's name from the database
})
]).click(()=>{
a person's name has been clicked
});
Styling
- DivUI – this is the default style