import React from 'react';
import './Dependency.css';

export default props => {
  return (
    <div className={'Dependency'}>
      <table width="100%">
        <tbody>
          <tr>
            <td width="35%">
              <h3>{props.name}</h3>
            </td>
            <td>
              {props.allowDownload ?
                <a href={void(0)} className={'DependencyLink'} onClick={()=>{props.onDownload(props.download); return false;}}><u>Install</u></a> :
                'Installing...'}
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  );
};