// (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP

import React, { Component, PropTypes } from 'react';

const CLASS_ROOT = "image";

export default class Image extends Component {

  render () {
    var classes = [CLASS_ROOT];
    if (this.props.size) {
      classes.push(CLASS_ROOT + "--" + this.props.size);
    }
    if (this.props.full) {
      if ('string' === typeof this.props.full) {
        classes.push(CLASS_ROOT + "--full-" + this.props.full);
      } else {
        classes.push(CLASS_ROOT + "--full");
      }
    }

    return (
      <img id={this.props.id} className={classes.join(' ')}
        src={this.props.src} />
    );
  }
}

Image.propTypes = {
  full: PropTypes.oneOf([true, 'horizontal', 'vertical', false]),
  src: PropTypes.string,
  size: PropTypes.oneOf(['small', 'medium', 'large'])
};

@@ -82,19 +82,8 @@
 t, %7B
- Component,
  Pro
@@ -104,16 +104,53 @@
 'react';
+%0Aimport classnames from 'classnames';
 %0A%0Aconst 
@@ -166,99 +166,105 @@
 T = 
-%22
+'
 image
-%22;%0A%0Aexport default class Image extends Component
+';%0A%0Aconst Image = props =%3E
  %7B%0A
-%0A
   
-render () %7B%0A    var classes = %5B
+let %7B size, full %7D = props;%0A  let classes = classnames(%0A    
 CLAS
@@ -273,198 +273,66 @@
 ROOT
-%5D;
+,
 %0A    
-if (this.props.size) %7B%0A      classes.push(CLASS_ROOT + %22--%22 + this.props.size);%0A    %7D%0A    if (this.props.full) %7B%0A      if ('string' === typeof this.props.full) %7B%0A        classes.push(
+%7B%0A      %5B%60$%7BCLASS_ROOT%7D--$%7Bsize%7D%60%5D: size,%0A      %5B%60$%7B
 CLAS
@@ -341,77 +341,64 @@
 ROOT
- + %22
+%7D
 --full
--%22 + this.props.full);%0A      %7D else %7B%0A        classes.push(
+%60%5D: typeof full === 'boolean' && full,%0A      %5B%60$%7B
 CLAS
@@ -407,39 +407,64 @@
 ROOT
- + %22
+%7D
 --full
-%22);%0A      %7D
+-$%7Bfull%7D%60%5D: typeof full === 'string'
 %0A    %7D%0A
-%0A
   
+);%0A%0A
   re
@@ -472,16 +472,8 @@
 urn 
-(%0A      
 %3Cimg
@@ -477,21 +477,16 @@
 img id=%7B
-this.
 props.id
@@ -509,38 +509,15 @@
 sses
-.join(' ')%7D%0A       
+%7D
  src=%7B
-this.
 prop
@@ -529,21 +529,12 @@
 %7D /%3E
-%0A    );%0A  %7D%0A%7D
+;%0A%7D;
 %0A%0AIm
@@ -695,12 +695,65 @@
 large'%5D)%0A%7D;%0A
+%0AImage.displayName = 'Image';%0A%0Aexport default Image;%0A

Convert Image to a stateless function