diff --git a/kitchen-sink/pages/ModalExample.js b/kitchen-sink/pages/ModalExample.js
index 6f1a7fd..e2fb572 100644
--- a/kitchen-sink/pages/ModalExample.js
+++ b/kitchen-sink/pages/ModalExample.js
@@ -4,9 +4,11 @@ import {
Container,
Group,
Button,
+ ButtonGroup,
Modal,
Field,
List,
+ Icon,
} from 'amazeui-touch';
const ModalExample = React.createClass({
@@ -89,6 +91,105 @@ const ModalExample = React.createClass({
}
});
+const LoginModal = React.createClass({
+ getInitialState() {
+ return {
+ isOpen: false,
+ };
+ },
+
+ open() {
+ this.setState({
+ isOpen: true,
+ })
+ },
+
+ close() {
+ this.setState({
+ isOpen: false,
+ });
+ },
+
+ handleLogin(e) {
+ let userName = this.refs.userName;
+ let pwd = this.refs.pwd;
+
+ if (!userName.getValue() || !pwd.getValue()) {
+ this.setState({
+ invalid: true
+ });
+
+ userName.getFieldDOMNode().focus();
+ return;
+ }
+
+ this.setState({
+ invalid: false
+ }, () => {
+ console.info('Valid, do something else.');
+ this.close();
+ });
+ },
+
+ render() {
+ return (
+ 请填写相关信息
+
+ {this.state.invalid ?