mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
rename and add margin
This commit is contained in:
parent
7719f7ea42
commit
e46f9c3f15
@ -5,7 +5,7 @@ import {
|
||||
IconButton, Icon,
|
||||
} from 'react-mdl';
|
||||
import { Link } from 'react-router';
|
||||
import StrategyInputPersentage from './strategy-input-persentage';
|
||||
import StrategyInputPercentage from './strategy-input-percentage';
|
||||
import StrategyInputList from './strategy-input-list';
|
||||
|
||||
const style = {
|
||||
@ -15,6 +15,12 @@ const style = {
|
||||
margin: '5px 20px 15px 0px',
|
||||
background: '#f2f9fc',
|
||||
};
|
||||
|
||||
const helpText = {
|
||||
color: 'rgba(0,0,0, 0.54)',
|
||||
fontSize: '12px',
|
||||
lineHeight: '14px',
|
||||
};
|
||||
class StrategyConfigure extends React.Component {
|
||||
|
||||
static propTypes () {
|
||||
@ -58,11 +64,11 @@ class StrategyConfigure extends React.Component {
|
||||
}
|
||||
return (
|
||||
<div key={name}>
|
||||
<StrategyInputPersentage
|
||||
<StrategyInputPercentage
|
||||
name={name}
|
||||
onChange={this.handleConfigChange.bind(this, name)}
|
||||
value={1 * value} />
|
||||
{description && <p>{description}</p>}
|
||||
{description && <p style={helpText}>{description}</p>}
|
||||
</div>
|
||||
);
|
||||
} else if (type === 'list') {
|
||||
@ -76,7 +82,7 @@ class StrategyConfigure extends React.Component {
|
||||
return (
|
||||
<div key={name}>
|
||||
<StrategyInputList name={name} list={list} setConfig={this.setConfig} />
|
||||
{description && <p>{description}</p>}
|
||||
{description && <p style={helpText}>{description}</p>}
|
||||
</div>
|
||||
);
|
||||
} else if (type === 'number') {
|
||||
@ -93,7 +99,7 @@ class StrategyConfigure extends React.Component {
|
||||
onChange={this.handleConfigChange.bind(this, name)}
|
||||
value={value}
|
||||
/>
|
||||
{description && <p>{description}</p>}
|
||||
{description && <p style={helpText}>{description}</p>}
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
@ -101,7 +107,7 @@ class StrategyConfigure extends React.Component {
|
||||
<div key={name}>
|
||||
<Textfield
|
||||
floatingLabel
|
||||
rows={2}
|
||||
rows={1}
|
||||
style={{ width: '100%' }}
|
||||
required={required}
|
||||
name={name}
|
||||
@ -109,7 +115,7 @@ class StrategyConfigure extends React.Component {
|
||||
onChange={this.handleConfigChange.bind(this, name)}
|
||||
value={value}
|
||||
/>
|
||||
{description && <p>{description}</p>}
|
||||
{description && <p style={helpText}>{description}</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ const labelStyle = {
|
||||
};
|
||||
|
||||
export default ({ name, value, onChange }) => (
|
||||
<div>
|
||||
<div style={{ marginBottom: '20px' }}>
|
||||
<div style={labelStyle}>{name}: {value}%</div>
|
||||
<Slider min={0} max={100} defaultValue={value} value={value} onChange={onChange} label={name} />
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user