WIP Version 0.0.1

This commit is contained in:
Ahmed Bouhuolia
2020-05-08 04:36:04 +02:00
parent bd7eb0eb76
commit 71cc561bb2
151 changed files with 1742 additions and 1081 deletions

View File

@@ -0,0 +1,44 @@
import React, { useEffect, useState } from 'react';
import { Omnibar } from '@blueprintjs/select';
import { MenuItem } from '@blueprintjs/core';
import { compose } from 'utils';
import SearchConnect from 'connectors/Search.connect';
function Search({
resultSearch,
globalSearchShow,
openGlobalSearch,
closeGlobalSearch,
}) {
const items = [
{ title: 'The Shawshank Redemption', year: 1994 },
{ title: 'The Godfather', year: 1972 },
{ title: 'The Godfather: Part II', year: 1974 },
];
const renderSearch = (search, { handleClick }) => (
<MenuItem
key={search.year}
text={search.title}
label={search.title}
onClick={handleClick}
/>
);
return (
<div>
<Omnibar
className={'navbar-omnibar'}
isOpen={globalSearchShow}
noResults={<MenuItem disabled={true} text='No results.' />}
onClose={() => closeGlobalSearch(false)}
resetOnSelect={true}
itemRenderer={renderSearch}
items={items}
// onItemSelect={onItemsSelect()}
/>
</div>
);
}
export default compose(SearchConnect)(Search);