Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //NeWITEm
- import React, { Component } from 'react'
- import 'bootstrap/dist/css/bootstrap.min.css';
- class NewItemInput extends Component {
- clicked(){
- }
- render () {
- let content;
- if(this.props.showInputs === false){
- content = (<button type="button" className="btn btn-primary btn-block"
- onClick= {this.props.toggleInputs}>Add new</button>);
- }
- else{
- content = (
- <div>
- <div className="col-md-4">
- <input type="text"/>
- </div>
- <div className="col-md-4">
- <input type="text"/>
- </div>
- <div className="col-md-4">
- <input type="text"/>
- <button type="button" className="btn btn-success">Save</button>
- <button type="button" className="btn btn-danger"
- onClick={this.props.toggleCancels}>Cancel</button>
- </div>
- </div>
- );
- }
- return (
- <div className="row">
- {content}
- </div>
- )
- }
- }
- export default NewItemInput
- /APP JS
- import React, { Component } from 'react'
- import 'bootstrap/dist/css/bootstrap.min.css';
- class NewItemInput extends Component {
- clicked(){
- }
- render () {
- let content;
- if(this.props.showInputs === false){
- content = (<button type="button" className="btn btn-primary btn-block"
- onClick= {this.props.toggleInputs}>Add new</button>);
- }
- else{
- content = (
- <div>
- <div className="col-md-4">
- <input type="text"/>
- </div>
- <div className="col-md-4">
- <input type="text"/>
- </div>
- <div className="col-md-4">
- <input type="text"/>
- <button type="button" className="btn btn-success">Save</button>
- <button type="button" className="btn btn-danger"
- onClick={this.props.toggleCancels}>Cancel</button>
- </div>
- </div>
- );
- }
- return (
- <div className="row">
- {content}
- </div>
- )
- }
- }
- export default NewItemInput
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement