Browse Source

wip implement launcher logic

Steven Silvester 8 years ago
parent
commit
57728c5ded
1 changed files with 6 additions and 1 deletions
  1. 6 1
      packages/launcher/src/index.ts

+ 6 - 1
packages/launcher/src/index.ts

@@ -241,10 +241,15 @@ class LauncherWidget extends VDomRenderer<LauncherModel> {
   protected render(): VirtualNode | VirtualNode[] {
     // Create an iterator that yields rendered item nodes.
     let children = map(this.model.items(), item => {
+      let icon = h.div({ className: item.iconClass }, item.iconLabel);
       let text = h.span({className: TEXT_CLASS }, item.displayName);
+      let onclick = () => {
+        console.log('hi clicked', item);
+      };
       return h.div({
+        onclick,
         className: ITEM_CLASS,
-      }, [text]);
+      }, [icon, text]);
     });
 
     let body = h.div({ className: BODY_CLASS  }, toArray(children));