-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #888 from internxt/feature/PB-1048-browse-selected…
…-search-item [PB-250]: feature/add global search
- Loading branch information
Showing
11 changed files
with
192 additions
and
106 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {} from '@phosphor-icons/react'; | ||
import { useTranslationContext } from 'app/i18n/provider/TranslationProvider'; | ||
import iconService from 'app/drive/services/icon.service'; | ||
|
||
const EmptyState = (): JSX.Element => { | ||
const { translate } = useTranslationContext(); | ||
const PdfIcon = iconService.getItemIcon(false, 'pdf'); | ||
const FolderIcon = iconService.getItemIcon(true); | ||
|
||
return ( | ||
<div className="flex h-full flex-col items-center justify-center"> | ||
<div className="relative h-20 w-28"> | ||
<FolderIcon className="absolute top-0 left-11 h-16 w-16 rotate-10 transform drop-shadow-soft filter" /> | ||
<PdfIcon className="absolute top-0 left-2 h-16 w-16 rotate-10- transform drop-shadow-soft filter" /> | ||
</div> | ||
<p className="text-xl font-medium text-gray-100">{translate('general.searchBar.emptyState.title')}</p> | ||
<p className="text-sm font-normal text-gray-60">{translate('general.searchBar.emptyState.subtitle')}</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default EmptyState; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const FilterItem = ({ id, Icon, name, filters, setFilters }): JSX.Element => { | ||
const toggleFilter = (filter) => { | ||
if (filters.includes(filter)) { | ||
setFilters((currentFilters) => currentFilters.filter((currentFilter) => currentFilter !== filter)); | ||
} else { | ||
setFilters((currentFilters) => [...currentFilters, filter]); | ||
} | ||
}; | ||
|
||
return ( | ||
<div | ||
className={`${ | ||
filters.includes(id) | ||
? 'bg-primary bg-opacity-10 text-primary ring-primary ring-opacity-20' | ||
: 'bg-white text-gray-80 ring-gray-10 hover:bg-gray-1 hover:shadow-sm hover:ring-gray-20 active:bg-gray-5 active:ring-gray-30' | ||
} flex h-8 cursor-pointer items-center space-x-2 rounded-full px-3 font-medium shadow-sm ring-1 transition-all duration-100 ease-out`} | ||
onClick={() => toggleFilter(id)} | ||
> | ||
<Icon className="h-5 w-5 drop-shadow-sm filter" /> | ||
<span className="text-sm">{name}</span> | ||
</div> | ||
); | ||
}; | ||
|
||
export default FilterItem; |
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
Oops, something went wrong.