Adds Loading Component (#3707)
This commit is contained in:
		
							parent
							
								
									c892a4f7ae
								
							
						
					
					
						commit
						456b50639c
					
				
							
								
								
									
										17
									
								
								js/src/ui/Loading/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								js/src/ui/Loading/index.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | ||||
| // Copyright 2015, 2016 Ethcore (UK) Ltd.
 | ||||
| // This file is part of Parity.
 | ||||
| 
 | ||||
| // Parity is free software: you can redistribute it and/or modify
 | ||||
| // it under the terms of the GNU General Public License as published by
 | ||||
| // the Free Software Foundation, either version 3 of the License, or
 | ||||
| // (at your option) any later version.
 | ||||
| 
 | ||||
| // Parity is distributed in the hope that it will be useful,
 | ||||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of
 | ||||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | ||||
| // GNU General Public License for more details.
 | ||||
| 
 | ||||
| // You should have received a copy of the GNU General Public License
 | ||||
| // along with Parity.  If not, see <http://www.gnu.org/licenses/>.
 | ||||
| 
 | ||||
| export default from './loading'; | ||||
							
								
								
									
										23
									
								
								js/src/ui/Loading/loading.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								js/src/ui/Loading/loading.css
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| /* Copyright 2015, 2016 Ethcore (UK) Ltd. | ||||
| /* This file is part of Parity. | ||||
| /* | ||||
| /* Parity is free software: you can redistribute it and/or modify | ||||
| /* it under the terms of the GNU General Public License as published by | ||||
| /* the Free Software Foundation, either version 3 of the License, or | ||||
| /* (at your option) any later version. | ||||
| /* | ||||
| /* Parity is distributed in the hope that it will be useful, | ||||
| /* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
| /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
| /* GNU General Public License for more details. | ||||
| /* | ||||
| /* You should have received a copy of the GNU General Public License | ||||
| /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. | ||||
| */ | ||||
| 
 | ||||
| .loading { | ||||
|   flex: 1; | ||||
|   display: flex; | ||||
|   align-items: center; | ||||
|   justify-content: center; | ||||
| } | ||||
							
								
								
									
										36
									
								
								js/src/ui/Loading/loading.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								js/src/ui/Loading/loading.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,36 @@ | ||||
| // Copyright 2015, 2016 Ethcore (UK) Ltd.
 | ||||
| // This file is part of Parity.
 | ||||
| 
 | ||||
| // Parity is free software: you can redistribute it and/or modify
 | ||||
| // it under the terms of the GNU General Public License as published by
 | ||||
| // the Free Software Foundation, either version 3 of the License, or
 | ||||
| // (at your option) any later version.
 | ||||
| 
 | ||||
| // Parity is distributed in the hope that it will be useful,
 | ||||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of
 | ||||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | ||||
| // GNU General Public License for more details.
 | ||||
| 
 | ||||
| // You should have received a copy of the GNU General Public License
 | ||||
| // along with Parity.  If not, see <http://www.gnu.org/licenses/>.
 | ||||
| 
 | ||||
| import React, { Component, PropTypes } from 'react'; | ||||
| import CircularProgress from 'material-ui/CircularProgress'; | ||||
| 
 | ||||
| import styles from './loading.css'; | ||||
| 
 | ||||
| export default class Loading extends Component { | ||||
|   static propTypes = { | ||||
|     size: PropTypes.number | ||||
|   }; | ||||
| 
 | ||||
|   render () { | ||||
|     const size = (this.props.size || 2) * 60; | ||||
| 
 | ||||
|     return ( | ||||
|       <div className={ styles.loading }> | ||||
|         <CircularProgress size={ size } /> | ||||
|       </div> | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @ -33,6 +33,7 @@ import Errors from './Errors'; | ||||
| import Form, { AddressSelect, FormWrap, TypedInput, Input, InputAddress, InputAddressSelect, InputChip, InputInline, Select, RadioButtons } from './Form'; | ||||
| import IdentityIcon from './IdentityIcon'; | ||||
| import IdentityName from './IdentityName'; | ||||
| import Loading from './Loading'; | ||||
| import MethodDecoding from './MethodDecoding'; | ||||
| import Modal, { Busy as BusyStep, Completed as CompletedStep } from './Modal'; | ||||
| import muiTheme from './Theme'; | ||||
| @ -72,6 +73,7 @@ export { | ||||
|   InputAddressSelect, | ||||
|   InputChip, | ||||
|   InputInline, | ||||
|   Loading, | ||||
|   Select, | ||||
|   IdentityIcon, | ||||
|   IdentityName, | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user