Remove const styles

This commit is contained in:
cyril lopez 2017-08-01 16:47:05 +02:00
parent d0908022b9
commit d8d7670ace
2 changed files with 6 additions and 7 deletions

View File

@ -23,6 +23,8 @@
* - handleFocus : function
* - placeholder : string if set to "" nothing will display
*
*
* - styles are retrieved from the HOC
*/
import React from 'react';
@ -107,10 +109,8 @@ class InputNumber extends React.Component { // eslint-disable-line react/prefer-
const bootStrapClassDanger = !this.props.deactivateErrorHighlight && !isEmpty(this.state.errors) ? 'has-danger' : '';
const placeholder = this.props.placeholder || this.props.name;
// retrieve styles from WithInput HOC
const styles = this.props.styles;
return (
<div className={`${styles.inputNumber} ${bootStrapClass} ${bootStrapClassDanger}`}>
<div className={`${this.props.styles.inputNumber} ${bootStrapClass} ${bootStrapClassDanger}`}>
<label htmlFor={this.props.name}><FormattedMessage {...{id: this.props.name}} /></label>
<input
type="number"

View File

@ -23,6 +23,8 @@
* - description : input description
* - handleFocus : function
* - placeholder : string if set to "" nothing will display
*
* - styles are retrieved from the HOC
*/
import React from 'react';
@ -123,11 +125,8 @@ class InputText extends React.Component { // eslint-disable-line react/prefer-st
const bootStrapClassDanger = !this.props.deactivateErrorHighlight && !isEmpty(this.state.errors) ? 'has-danger' : '';
const placeholder = this.props.placeholder || this.props.name;
// retrieve styles from WhitInput HOC
const styles = this.props.styles;
return (
<div className={`${styles.inputText} ${bootStrapClass} ${bootStrapClassDanger}`}>
<div className={`${this.props.styles.inputText} ${bootStrapClass} ${bootStrapClassDanger}`}>
<label htmlFor={this.props.name}><FormattedMessage {...{id: this.props.name}} /></label>
<input
name={this.props.target}