Skip to content

Instantly share code, notes, and snippets.

@vutran
Created September 12, 2017 13:55
Show Gist options
  • Save vutran/080737f860ed1e57589788c3f5a80bd9 to your computer and use it in GitHub Desktop.
Save vutran/080737f860ed1e57589788c3f5a80bd9 to your computer and use it in GitHub Desktop.
Omnibar - Custom Item Renderer
function ResultItem(props) {
return (
<div>
<a href={props.url}>{props.title}</a>
</div>
);
};
class App extends React.Component {
render() {
return (
<Omnibar
placeholder="Search GitHub, and npm"
extensions={[GitHubSearchExtension, NpmSearchExtension]}
resultRenderer={ResultItem} />
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment