Skip to content

Instantly share code, notes, and snippets.

@nesbtesh
Created February 1, 2017 18:04
Show Gist options
  • Save nesbtesh/4b949127e9ac899531a2692782b0433d to your computer and use it in GitHub Desktop.
Save nesbtesh/4b949127e9ac899531a2692782b0433d to your computer and use it in GitHub Desktop.
import React from "react";
import {parseUri} from "../../../utils";
const AutocompleteItem = (props) => {
const {props} = this;
const selectedClass = props.selected === true ? "selected" : "";
var path = parseUri(props.url).path;
path = path.length <= 0 ? props.url : "..." + path;
return (
<li
onMouseLeave={props.onMouseLeave}
className={selectedClass}>
<i className="ion-ios-eye"
data-image={props.image}
data-url={props.url}
data-title={props.title}
onClick={props.handlePlanetViewClick} />
<span
onMouseEnter={props.onMouseEnter}
>
<div className="dot bg-mint" />
{path}
</span>
</li>
);
}
export default AutocompleteItem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment