Created
September 12, 2017 13:55
-
-
Save vutran/080737f860ed1e57589788c3f5a80bd9 to your computer and use it in GitHub Desktop.
Omnibar - Custom Item Renderer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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