Skip to content

Instantly share code, notes, and snippets.

@danielrudn danielrudn/SearchResultList.jsx Secret
Created Jul 17, 2018

Embed
What would you like to do?
import React from 'react';
import SearchResult from './SearchResult';
export default ({ results, loading }) => (
<div
className="ui raised segment no padding"
style={{
position: 'absolute',
width: '100%',
left: '0px',
top: '75%',
visibility: results.length === 0 ? 'hidden' : 'visible',
zIndex: '99',
height: '256px',
overflowY: 'scroll'
}}
>
{loading ? (
<div className="ui active inverted dimmer">
<div className="ui text loader">Loading...</div>
</div>
) : (
<div className="ui relaxed divided link items">
{results.map(result => <SearchResult key={result.id} result={result} />)}
</div>
)}
</div>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.