import React from 'react'; import PropTypes from 'prop-types'; import { Utils } from '../../utils/utils'; const propTypes = { item: PropTypes.object.isRequired, onItemClickHandler: PropTypes.func.isRequired, }; class SearchResultItem extends React.Component { onClickHandler = () => { var item = this.props.item; this.props.onItemClickHandler(item); } render() { let item = this.props.item; let fileIconUrl = item.is_dir ? Utils.getFolderIconUrl(false, 192) : Utils.getFileIconUrl(item.name, 192); return (