UNPKG

acklen-keystone

Version:

Web Application Framework and Admin GUI / Content Management System built on Express.js and Mongoose

53 lines (47 loc) 1.09 kB
/** * The login form of the signin screen */ import React, { PropTypes } from 'react'; import { Button, Form, FormField, FormInput } from '../../App/elemental'; const LoginForm = ({ email, handleInputChange, handleSubmit, isAnimating, password, }) => { return ( <div className="auth-box__col"> <Form onSubmit={handleSubmit} noValidate> <FormField label="Email" htmlFor="email"> <FormInput autoFocus type="email" name="email" onChange={handleInputChange} value={email} /> </FormField> <FormField label="Password" htmlFor="password"> <FormInput type="password" name="password" onChange={handleInputChange} value={password} /> </FormField> <Button disabled={isAnimating} color="primary" type="submit"> Sign In </Button> </Form> </div> ); }; LoginForm.propTypes = { email: PropTypes.string, handleInputChange: PropTypes.func.isRequired, handleSubmit: PropTypes.func.isRequired, isAnimating: PropTypes.bool, password: PropTypes.string, }; module.exports = LoginForm;