/**
*
* IKInputText
*
*/

import React, { PureComponent } from 'react';


class IKInputText extends PureComponent { // eslint-disable-line react/prefer-stateless-function
  static propTypes = {
    label: React.PropTypes.string.isRequired,
    value: React.PropTypes.string.isRequired,
  };

  constructor(props) {
    super(props);
  }

  render() {
    const props = $.extend({}, this.props)

    let children = null;
    if (props.value) {
      children = (<span>{props.value}</span>)
    }

    return (
      <div className="ikmd-input ikmd-input-text">
        <label class={props.value? 'shrunken': ''}>{props.label}</label>
        {children}
      </div>
    );
  }
}

export default IKInputText;
