diff --git a/src/assets/images/Avatar.png b/src/assets/images/Avatar.png new file mode 100644 index 0000000..42269de Binary files /dev/null and b/src/assets/images/Avatar.png differ diff --git a/src/components/Input.tsx b/src/components/Input.tsx index 6b81c62..2f642bb 100644 --- a/src/components/Input.tsx +++ b/src/components/Input.tsx @@ -1,11 +1,12 @@ import { FC, InputHTMLAttributes, useState } from 'react' import { clx } from '../helpers/utils'; import EyeIcon from '../assets/images/eye.svg' +import { SearchNormal } from 'iconsax-react'; type Variant = "floating_outlined" | "primary" | "search"; type Props = { - label: string; + label?: string; className?: string; variant?: Variant; error_text?: string; @@ -22,6 +23,7 @@ const Input: FC = (props: Props) => { const inputClass = clx( 'w-full h-10 text-black block px-4 text-xs rounded-xl mt-1 border border-border', props.readOnly && 'bg-gray-100', + props.variant === 'search' && 'bg-[#EEF0F7] border-0 ps-10', props.className ); @@ -39,6 +41,11 @@ const Input: FC = (props: Props) => { props.type === 'password' && setShowPassword((oldValue) => !oldValue)} src={EyeIcon} className='w-5 absolute top-0 bottom-0 cursor-pointer my-auto left-3' /> } + + { + props.variant === 'search' && + + } ) diff --git a/src/langs/fa.json b/src/langs/fa.json index e92f7d7..80710c5 100644 --- a/src/langs/fa.json +++ b/src/langs/fa.json @@ -54,5 +54,8 @@ "learning": "آموزش", "setting": "تنظیمات", "logout": "خروج" + }, + "header": { + "search": "جستجو" } } diff --git a/src/shared/Header.tsx b/src/shared/Header.tsx index ad0998f..362cdae 100644 --- a/src/shared/Header.tsx +++ b/src/shared/Header.tsx @@ -1,9 +1,36 @@ import { FC } from 'react' +import Input from '../components/Input' +import { ArrowDown2, Element3, Notification, Wallet } from 'iconsax-react' +import AvatarImage from '../assets/images/Avatar.png' +import { useTranslation } from 'react-i18next' const Header: FC = () => { - return ( -
+ const { t } = useTranslation('global') + + return ( +
+ +
+ +
+
+ + + +
+
+ +
+
+
مهرداد مظفری
+ +
+
+
) }