added icons

This commit is contained in:
Abhinav 2022-03-19 20:43:59 +05:30
parent dece1c5ff2
commit 1d9d2362e6
3 changed files with 44 additions and 0 deletions

View file

@ -37,6 +37,8 @@ import { Col } from 'react-bootstrap';
import { Person, ThingClass, WordGroup } from 'types/machineLearning'; import { Person, ThingClass, WordGroup } from 'types/machineLearning';
import { IndexStatus } from 'types/machineLearning/ui'; import { IndexStatus } from 'types/machineLearning/ui';
import { PeopleList } from './MachineLearning/PeopleList'; import { PeopleList } from './MachineLearning/PeopleList';
import ObjectIcon from './icons/ObjectIcon';
import TextIcon from './icons/TextIcon';
const Wrapper = styled.div<{ isDisabled: boolean; isOpen: boolean }>` const Wrapper = styled.div<{ isDisabled: boolean; isOpen: boolean }>`
position: fixed; position: fixed;
@ -303,6 +305,10 @@ export default function SearchBar(props: Props) {
return <ImageIcon />; return <ImageIcon />;
case SuggestionType.VIDEO: case SuggestionType.VIDEO:
return <VideoIcon />; return <VideoIcon />;
case SuggestionType.THING:
return <ObjectIcon />;
case SuggestionType.TEXT:
return <TextIcon />;
default: default:
return <SearchIcon />; return <SearchIcon />;
} }

View file

@ -0,0 +1,19 @@
import React from 'react';
export default function ObjectIcon(props) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
height={props.height}
viewBox={props.viewBox}
width={props.width}>
<path d="M11.499 12.03v11.971l-10.5-5.603v-11.835l10.5 5.467zm11.501 6.368l-10.501 5.602v-11.968l10.501-5.404v11.77zm-16.889-15.186l10.609 5.524-4.719 2.428-10.473-5.453 4.583-2.499zm16.362 2.563l-4.664 2.4-10.641-5.54 4.831-2.635 10.474 5.775z" />
</svg>
);
}
ObjectIcon.defaultProps = {
height: 20,
width: 20,
viewBox: '0 0 24 24',
};

View file

@ -0,0 +1,19 @@
import React from 'react';
export default function TextIcon(props) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
height={props.height}
viewBox={props.viewBox}
width={props.width}>
<path d="M22 0h-20v6h1.999c0-1.174.397-3 2.001-3h4v16.874c0 1.174-.825 2.126-2 2.126h-1v2h9.999v-2h-.999c-1.174 0-2-.952-2-2.126v-16.874h4c1.649 0 2.02 1.826 2.02 3h1.98v-6z" />
</svg>
);
}
TextIcon.defaultProps = {
height: 16,
width: 16,
viewBox: '0 0 28 28',
};