diff --git a/src/components/Form/InputSearch.tsx b/src/components/Form/InputSearch.tsx index 29e0df964..03142bb11 100644 --- a/src/components/Form/InputSearch.tsx +++ b/src/components/Form/InputSearch.tsx @@ -1,13 +1,13 @@ import React from "react"; -import { Input } from "antd"; +import { TextField, InputAdornment } from "@mui/material"; import styled from "styled-components"; import colors from "../../styles/colors"; -const InputSearchStyled = styled(Input.Search)` - span.ant-input-group-addon { - display: none; +const InputSearchStyled = styled(TextField)` + .MuiInputAdornment-root { + color: ${colors.primary}; } - span.ant-input-affix-wrapper { + .MuiOutlinedInput-root { background: ${({ backgroundColor = colors.lightNeutral }) => backgroundColor}; box-shadow: 0px 2px 2px ${colors.shadow}; @@ -16,7 +16,7 @@ const InputSearchStyled = styled(Input.Search)` border-color: ${colors.neutralTertiary}; } } - input.ant-input { + .MuiOutlinedInput-input { background: ${({ backgroundColor = colors.lightNeutral }) => backgroundColor}; color: ${colors.blackSecondary}; @@ -44,14 +44,19 @@ const InputSearch = (props) => { return ( doSearch(e)} - suffix={props.suffix || <>} - prefix={props.prefix || <>} + InputProps={{ + startAdornment: props.prefix ? ( + {props.prefix} + ) : null, + endAdornment: props.suffix ? ( + {props.suffix} + ) : null, + }} data-cy={props["data-cy"] || "testInputSearchPersonality"} {...props} /> diff --git a/src/components/Home/HomeHeader/HomeHeaderSearch.tsx b/src/components/Home/HomeHeader/HomeHeaderSearch.tsx index f691d739f..47458447e 100644 --- a/src/components/Home/HomeHeader/HomeHeaderSearch.tsx +++ b/src/components/Home/HomeHeader/HomeHeaderSearch.tsx @@ -10,6 +10,7 @@ import AletheiaButton, { ButtonType } from "../../Button"; import HomeHeaderSearchStyled from "./HomeHeaderSearch.style"; import { useAtom } from "jotai"; import { currentNameSpace } from "../../../atoms/namespace"; +import { InputAdornment } from "@mui/material"; const HomeHeaderSearch = () => { const { t } = useTranslation(); @@ -45,10 +46,15 @@ const HomeHeaderSearch = () => {

{t("home:homeHeaderSearchTitle")}

- } + InputProps={{ + startAdornment: ( + + + + ), + }} data-cy={"testInputSearchOverlay"} onChange={({ target }) => setName(target.value)} onKeyDown={({ key }) => { diff --git a/src/components/Personality/PersonalityCreateSearch.tsx b/src/components/Personality/PersonalityCreateSearch.tsx index f2df6e9e1..521482aef 100644 --- a/src/components/Personality/PersonalityCreateSearch.tsx +++ b/src/components/Personality/PersonalityCreateSearch.tsx @@ -58,8 +58,7 @@ const PersonalityCreateSearch = ({ } else { router .push( - `/${ - nameSpace === NameSpaceEnum.Main ? "" : nameSpace + `/${nameSpace === NameSpaceEnum.Main ? "" : nameSpace }${path}` ) .catch((e) => e); diff --git a/src/components/Search/OverlaySearchInput.tsx b/src/components/Search/OverlaySearchInput.tsx index 7c7af9b3f..e6b0f1486 100644 --- a/src/components/Search/OverlaySearchInput.tsx +++ b/src/components/Search/OverlaySearchInput.tsx @@ -48,6 +48,7 @@ const OverlaySearchInput = () => { return ( }