Created
January 28, 2016 05:35
-
-
Save khle/1ad40f74d53fbdfa5fe4 to your computer and use it in GitHub Desktop.
CycleSocket Chat chatPane.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {Observable} from 'rx'; | |
| import {h4, div, ul, li, span, p, input, label, a, i} from '@cycle/dom'; | |
| export function chatPane({DOM}) { | |
| let vdom$ = Observable.of( | |
| div([ | |
| h4('Chat Messages'), | |
| div({className: 'row'}, [ | |
| div({className: 'input-field col s10'}, [ | |
| input({id: 'input-msg', className: 'validate', value: ''}), | |
| label({className: 'active'}, 'Type your chat, enter or hit button to send') | |
| ]), | |
| div({className: 'input-field col s2'}, [ | |
| a({id: 'send-btn', className: 'btn-floating btn-large waves-effect waves-light red'}, [ | |
| i({className: 'material-icons'}, 'send') | |
| ]) | |
| ]), | |
| ]) | |
| ]) | |
| ); | |
| return { | |
| DOM: vdom$, | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment