import {createElement, Component} from 'weex-rx';
import { View, Text} from 'nuke-components';
import { Button,Modal } from 'nuke';
import {mount} from 'nuke-mounter';
let style={
btns:{
marginRight:'20rem'
}
}
let App = class NukeDemoIndex extends Component {
constructor() {
super();
}
alert() {
Modal.alert('Hi');
}
confirm(){
Modal.confirm('是否确认', (result) => {});
}
prompt(){
Modal.prompt('请输入', (result) => {});
}
toast(){
Modal.toast('hello');
}
render() {
return (
<View style={{display:'flex',flexDirection:'row'}} >
<Button style={style.btns} onPress={this.alert.bind(this)} type="primary">alert</Button>
<Button style={style.btns} onPress={this.confirm.bind(this)} type="primary">confirm</Button>
<Button style={style.btns} onPress={this.prompt.bind(this)} type="primary">prompt</Button>
<Button style={style.btns} onPress={this.toast.bind(this)} type="primary">toast</Button>
</View>
);
}
}
mount(<App/>, mountNode);