import React from 'react'; import cn from 'classnames'; import { Ships } from 'coriolis-data/dist'; import TranslatedComponent from './TranslatedComponent'; import { Rocket } from './SvgIcons'; /** * Selector for ships */ export default class ShipSelector extends TranslatedComponent { static PropTypes = { initial: React.PropTypes.object.isRequired, onChange: React.PropTypes.func.isRequired }; /** * Constructor * @param {Object} props React Component properties */ constructor(props) { super(props); this.state = { ship : this.props.initial }; } /** * Generate the ships menu * @return {React.Component} Menu */ _getShipsMenu() { const _selectShip = this._selectShip; const _openMenu = this._openMenu; let shipList = []; for (let s in Ships) { shipList.push(