diff --git a/pages/index.tsx b/pages/index.tsx index c20682748..e803f63dc 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,6 +1,6 @@ -import { ButtonCommon, Inputcommon, Layout } from 'src/components/common'; -import { IconBuy, IconSearch } from 'src/components/icons'; +import { ButtonCommon, Inputcommon, InputSearch, Layout } from 'src/components/common'; +import { IconBuy } from 'src/components/icons'; export default function Home() { return ( <> @@ -13,7 +13,7 @@ export default function Home() { {/* demo */}
- }/> +
}>Button diff --git a/src/components/common/InputSearch/InputSearch.tsx b/src/components/common/InputSearch/InputSearch.tsx new file mode 100644 index 000000000..9c02a239c --- /dev/null +++ b/src/components/common/InputSearch/InputSearch.tsx @@ -0,0 +1,22 @@ +import React from 'react'; +import { IconSearch } from 'src/components/icons'; +import { LANGUAGE } from 'src/utils/language.utils'; +import { Inputcommon } from '..'; + +interface Props { + onChange?: (value: string | number) => void, + onEnter?: (value: string | number) => void, +} + +const InputSearch = ({ onChange, onEnter }: Props) => { + return ( + } + onChange={onChange} + onEnter={onEnter} + /> + ) +} + +export default InputSearch diff --git a/src/components/common/index.ts b/src/components/common/index.ts index 4e9637e6c..22bb3c537 100644 --- a/src/components/common/index.ts +++ b/src/components/common/index.ts @@ -5,3 +5,4 @@ export { default as ViewAllItem} from './ViewAllItem/ViewAllItem' export { default as ItemWishList} from './ItemWishList/ItemWishList' export { default as Logo} from './Logo/Logo' export { default as Inputcommon} from './InputCommon/InputCommon' +export { default as InputSearch} from './InputSearch/InputSearch' diff --git a/src/utils/language.utils.ts b/src/utils/language.utils.ts index 4343ed9db..3f8d61926 100644 --- a/src/utils/language.utils.ts +++ b/src/utils/language.utils.ts @@ -3,4 +3,7 @@ export const LANGUAGE = { BUY_NOW: 'Buy now', SHOP_NOW: 'Shop now', }, + PLACE_HOLDER: { + SEARCH: 'Search', + } } \ No newline at end of file