mirror of
				https://github.com/fspc/workstand.git
				synced 2025-10-31 08:25:35 -04:00 
			
		
		
		
	Add close button button.
This commit is contained in:
		
							parent
							
								
									48b3fd7764
								
							
						
					
					
						commit
						af6168028a
					
				| @ -25,6 +25,7 @@ class BikeForm extends React.Component { | |||||||
|   static propTypes = { |   static propTypes = { | ||||||
|     bike: PropTypes.object, |     bike: PropTypes.object, | ||||||
|     editing: PropTypes.bool, |     editing: PropTypes.bool, | ||||||
|  |     handleClose: PropTypes.func, | ||||||
|   } |   } | ||||||
|   constructor({ bike, editing = false }) { |   constructor({ bike, editing = false }) { | ||||||
|     super(); |     super(); | ||||||
| @ -244,8 +245,9 @@ class BikeForm extends React.Component { | |||||||
|           } |           } | ||||||
|         </div> |         </div> | ||||||
|         <div className="mdl-grid"> |         <div className="mdl-grid"> | ||||||
|           <div className="mdl-cell right"> |           <div style={{ textAlign: 'right' }} className="mdl-cell mdl-cell--12-col"> | ||||||
|             <RaisedButton label="Save" onTouchTap={this.handleSave} /> |             <RaisedButton label="Cancel" onTouchTap={this.props.handleClose} secondary /> | ||||||
|  |             <RaisedButton label="Save" onTouchTap={this.props.handleSave} default /> | ||||||
|           </div> |           </div> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|  | |||||||
| @ -37,20 +37,6 @@ export default class BikeModal extends React.Component { | |||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   render() { |   render() { | ||||||
|     const actions = [ |  | ||||||
|       <FlatButton |  | ||||||
|         label="Cancel" |  | ||||||
|         primary |  | ||||||
|         onTouchTap={this.handleClose} |  | ||||||
|       />, |  | ||||||
|       <FlatButton |  | ||||||
|         label="Submit" |  | ||||||
|         primary |  | ||||||
|         disabled |  | ||||||
|         onTouchTap={this.handleClose} |  | ||||||
|       />, |  | ||||||
|     ]; |  | ||||||
| 
 |  | ||||||
|     const title = this.state.bike && this.state.bike.stolen ? |     const title = this.state.bike && this.state.bike.stolen ? | ||||||
|       (<div> |       (<div> | ||||||
|         <h3>{this.props.editing ? 'Edit Bike' : 'Add Bike'}</h3> |         <h3>{this.props.editing ? 'Edit Bike' : 'Add Bike'}</h3> | ||||||
| @ -61,8 +47,6 @@ export default class BikeModal extends React.Component { | |||||||
|     return (<div> |     return (<div> | ||||||
|       <Dialog |       <Dialog | ||||||
|         title={title} |         title={title} | ||||||
|         actions={actions} |  | ||||||
|         modal |  | ||||||
|         open={this.state.open} |         open={this.state.open} | ||||||
|         autoScrollBodyContent |         autoScrollBodyContent | ||||||
|       > |       > | ||||||
| @ -71,6 +55,7 @@ export default class BikeModal extends React.Component { | |||||||
|             bike={this.state.bike} |             bike={this.state.bike} | ||||||
|             editing={this.state.editing} |             editing={this.state.editing} | ||||||
|             getBikes={this.props.getBikes} |             getBikes={this.props.getBikes} | ||||||
|  |             handleClose={this.handleClose} | ||||||
|           /> : |           /> : | ||||||
|           <div>Unable to edit bike.</div> |           <div>Unable to edit bike.</div> | ||||||
|         } |         } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user