import React from 'react';

export default React.createClass({
  render() {
    return (
      <div className="pad-all" onClick={this.select}>
        <h4>{this.props.pit.name || this.props.pit.id}</h4>
        <div className="table-container">
          <table>
            <tbody>
              <tr>
                <td className="label">Dataset</td>
                <td><code>{this.props.pit.dataset}</code></td>
              </tr>
              <tr>
                <td className="label">ID</td>
                <td>{this.props.pit.id || this.props.pit.uri}</td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    );
  },
  select() {
    this.props.selectPit(this.props.pit);
  },
});

@@ -5,16 +5,31 @@
 rt React
+, %7B PropTypes %7D
  from 'r
@@ -77,18 +77,132 @@
 %7B%0A  
-render() %7B
+propTypes: %7B%0A    pit: PropTypes.object.isRequired,%0A  %7D,%0A%0A  render() %7B%0A    const %7B name, id, uri, dataset %7D = this.props.pit;
 %0A   
@@ -256,22 +256,27 @@
 k=%7Bthis.
-select
+handleClick
 %7D%3E%0A     
@@ -287,46 +287,16 @@
 h4%3E%7B
-this.props.pit.name %7C%7C this.props.pit.
+name %7C%7C 
 id%7D%3C
@@ -477,31 +477,16 @@
 %3E%3Ccode%3E%7B
-this.props.pit.
 dataset%7D
@@ -608,44 +608,14 @@
 td%3E%7B
-this.props.pit.id %7C%7C this.props.pit.
+id %7C%7C 
 uri%7D
@@ -724,16 +724,22 @@
  %7D,%0A
+%0A
   
-select
+handleClick
 () %7B

Add propTypes to Pit component