Skip to content

Commit

Permalink
Merge pull request #62 from FinalDoubleTen/hotfix-01
Browse files Browse the repository at this point in the history
Hotfix: 검색창 아이콘 레이아웃 수정
  • Loading branch information
LeHiHo authored Jan 4, 2024
2 parents 617b438 + ea7c6f9 commit 81e0853
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/components/common/icons/Icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,8 @@ export const ChatIcon: React.FC<IconProps> = ({
};

export const CloseIcon: React.FC<IconProps> = ({
size = 25,
color = 'black',
size = 16,
color = 'white',
fill = 'none',
}) => {
return (
Expand Down Expand Up @@ -662,7 +662,7 @@ export const DownIcon: React.FC<IconProps> = ({
};

export const SearchIcon: React.FC<IconProps> = ({
size = 25,
size = 16,
color = 'black',
fill = 'none',
}) => {
Expand Down
20 changes: 12 additions & 8 deletions src/components/search/SearchInput.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { CloseIcon } from '@components/common/icons/Icons';
import { LeftIcon } from '@components/common/icons/Icons';
import { BackIcon, CloseIcon } from '@components/common/icons/Icons';
import { SearchIcon } from '@components/common/icons/Icons';
import React, { useState } from 'react';
import { useNavigate } from 'react-router-dom';
Expand Down Expand Up @@ -36,20 +35,25 @@ const SearchInput = () => {
return (
<>
<div className="relative mb-3 flex items-center">
<LeftIcon className="cursor-pointer" onClick={goBack} />
<SearchIcon className="absolute left-[36px] top-1/2 -translate-y-1/2 transform" />
<div className="cursor-pointer" onClick={goBack}>
<BackIcon />
</div>
<div className="absolute left-[36px] top-1/2 -translate-y-1/2 transform">
<SearchIcon />
</div>
<input
className="body1 ml-2.5 h-[40px] w-full items-center rounded-lg bg-gray1 pl-[32px] pr-2.5 focus:outline-none"
className="body1 ml-5 h-[40px] w-full items-center rounded-lg bg-gray1 pl-[32px] pr-2.5 focus:outline-none"
placeholder="어디로 떠나세요?"
value={inputValue}
onChange={handleChange}
onKeyPress={handleKeyPress}
/>
{inputValue && (
<CloseIcon
<div
className="absolute right-2 top-1/2 -translate-y-1/2 transform cursor-pointer"
onClick={clearInput}
/>
onClick={clearInput}>
<CloseIcon />
</div>
)}
</div>
</>
Expand Down
1 change: 0 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export default {
gray6: '#38393C',
gray7: '#1E1E1E',
red: '#F00',
main1: '#062139',
},
},
},
Expand Down

0 comments on commit 81e0853

Please sign in to comment.