Skip to content

Commit

Permalink
Add search icon
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyakwix committed Feb 3, 2024
1 parent 45daea7 commit 8a209f6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/assets/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export * from './chevron-right';
export * from './close';
export * from './facebook-logo';
export * from './google-logo';
export * from './search';
10 changes: 10 additions & 0 deletions src/assets/icons/search.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export const SearchIcon = () => {
return (
<svg width="40" viewBox="0 0 40 40">
<g fill="currentColor" fillRule="evenodd" clipRule="evenodd">
<path d="M12 17.5a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM18.5 9a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17Z" />
<path d="m23.028 23.442 1.414-1.414 6.215 6.215-1.414 1.414-6.215-6.215Z" />
</g>
</svg>
);
};
5 changes: 4 additions & 1 deletion src/components/icon/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
CloseIcon,
FacebookLogoIcon,
GoogleLogoIcon,
SearchIcon,
} from '../../assets/icons';
import classNames from 'classnames';
import styles from './icon.module.scss';
Expand All @@ -15,7 +16,8 @@ export type IconOptions =
| 'chevronRight'
| 'close'
| 'facebookLogo'
| 'googleLogo';
| 'googleLogo'
| 'search';

const iconDictionary = {
appleLogo: <AppleLogoIcon />,
Expand All @@ -24,6 +26,7 @@ const iconDictionary = {
close: <CloseIcon />,
facebookLogo: <FacebookLogoIcon />,
googleLogo: <GoogleLogoIcon />,
search: <SearchIcon />,
};

export interface IconProps {
Expand Down

0 comments on commit 8a209f6

Please sign in to comment.