diff --git a/src/components/commons/mapInput/MapInput.styled.ts b/src/components/commons/mapInput/MapInput.styled.ts
index 84e282cd..ec5ad590 100644
--- a/src/components/commons/mapInput/MapInput.styled.ts
+++ b/src/components/commons/mapInput/MapInput.styled.ts
@@ -141,7 +141,8 @@ export const DropDownItem = styled.div`
export const RoadName = styled.p`
align-self: stretch;
- color: ${({ theme }) => theme.colors.pink_200};
+ color: ${({ theme }) => theme.colors.gray_0};
+ //color: ${({ theme }) => theme.colors.pink_200};
${({ theme }) => theme.fonts["body1-normal-semi"]};
white-space: nowrap;
`;
diff --git a/src/components/commons/mapInput/MapInput.tsx b/src/components/commons/mapInput/MapInput.tsx
index e3abbd09..9613f00f 100644
--- a/src/components/commons/mapInput/MapInput.tsx
+++ b/src/components/commons/mapInput/MapInput.tsx
@@ -98,6 +98,16 @@ const MapInput = ({
}
};
+ const matchStringPink = (inputValue: string, result: string) => {
+ const regex = new RegExp(`(${_.escapeRegExp(inputValue)})`, "gi");
+ const highlightedResult = result.replace(
+ regex,
+ (match) => `${match}`
+ );
+
+ return ;
+ };
+
useEffect(() => {
setInputValue(value as string);
prevValueRef.current = value as string;
@@ -191,7 +201,7 @@ const MapInput = ({
setLatitudeLongitude(place.y, place.x); //lat이 y값
}}
>
- {place.place_name}
+ {matchStringPink(inputValue, place.place_name)}
{place.road_address_name}
{idx !== places.length - 1 && }