mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	add number type
This commit is contained in:
		
							parent
							
								
									609e07d33b
								
							
						
					
					
						commit
						0958a98669
					
				| @ -74,6 +74,20 @@ class StrategyConfigure extends React.Component { | ||||
|                             .filter(Boolean); | ||||
|                     } | ||||
|                     return (<StrategyInputList key={field} field={field} list={list} setConfig={this.setConfig} />); | ||||
|                 } else if (type === 'number') { | ||||
|                     return ( | ||||
|                         <Textfield | ||||
|                             pattern="-?[0-9]*(\.[0-9]+)?" | ||||
|                             error={`${field} is not a number!`} | ||||
|                             floatingLabel | ||||
|                             style={{ width: '100%' }} | ||||
|                             key={field} | ||||
|                             name={field} | ||||
|                             label={field} | ||||
|                             onChange={this.handleConfigChange.bind(this, field)} | ||||
|                             value={value} | ||||
|                         /> | ||||
|                     ); | ||||
|                 } else { | ||||
|                     return ( | ||||
|                         <Textfield | ||||
| @ -124,7 +138,7 @@ class StrategyConfigure extends React.Component { | ||||
|                     {this.props.strategyDefinition.description} | ||||
|                 </CardText> | ||||
|                 { | ||||
|                     inputFields && <CardActions border > | ||||
|                     inputFields && <CardActions border style={{ padding: '20px' }}> | ||||
|                         {inputFields} | ||||
|                     </CardActions> | ||||
|                 } | ||||
|  | ||||
| @ -2,7 +2,7 @@ import React from 'react'; | ||||
| import { Slider }  from 'react-mdl'; | ||||
| 
 | ||||
| const labelStyle = { | ||||
|     margin: '10px', | ||||
|     margin: '20px 0', | ||||
|     textAlign: 'center', | ||||
|     color: '#3f51b5', | ||||
|     fontSize: '12px', | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user