import React, {Component, PropTypes} from 'react'; import {RetinaImg, Flexbox, EditableList} from 'nylas-component-kit'; class PreferencesAccountList extends Component { static propTypes = { accounts: PropTypes.array, onAddAccount: PropTypes.func.isRequired, onAccountSelected: PropTypes.func.isRequired, onRemoveAccount: PropTypes.func.isRequired, } _onAccountSelected = (accountComp, idx)=> { this.props.onAccountSelected(this.props.accounts[idx], idx); } _onRemoveAccount = (accountComp, idx)=> { this.props.onRemoveAccount(this.props.accounts[idx], idx); } _renderAccount = (account)=> { const label = account.label; const accountSub = `${account.name || 'No name provided'} <${account.emailAddress}>`; return (