Skip to content

Commit

Permalink
design: 필터링 영역 디자인 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
bassyu committed Sep 17, 2023
1 parent d1ab5b3 commit 99ec7f1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/search/SearchBox/SearchBox.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ export const ResultList = styled.ul<{ $maxHeight: string }>`
max-height: ${(props) => props.$maxHeight};
`;

export const ResultMessage = styled.p<{ $height: string }>`
export const ResultMessage = styled.p`
display: flex;
flex-direction: column;
row-gap: 5px;
align-items: center;
justify-content: center;
width: 100%;
height: ${(props) => props.$height};
padding: 8px 0;
color: ${(props) => props.theme.color.sub};
text-align: center;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/search/SearchBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const SearchBox = (props: SearchBoxProps) => {
</ResultItem>
))}
</ResultList>
<ResultMessage $height={height}>
<ResultMessage>
{searchResults?.length ? '찾는 식물이 없으신가요?' : MESSAGE.noSearchResult}
<StyledLink to={URL_PATH.newDictionaryPlantRequest} state={searchName}>
등록 신청하기
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ export const FilterArea = styled.div`
padding-left: 16px;
`;

export const Name = styled.p`
export const FilterTag = styled.p`
display: flex;
column-gap: 4px;
align-items: center;
font-size: 1.4rem;
`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { DictionaryPlantNameSearchResult } from 'types/dictionaryPlant';
import SearchBox from 'components/search/SearchBox';
import { DeleteFilterButton, Name, Wrapper, FilterArea } from './GardenPostListHeader.style';
import { DeleteFilterButton, FilterTag, Wrapper, FilterArea } from './GardenPostListHeader.style';

interface GardenPostListHeaderProps {
selectedDictionaryPlant: DictionaryPlantNameSearchResult | null;
Expand All @@ -18,10 +18,10 @@ const GardenPostListHeader = ({
<SearchBox onResultClick={select} height="36px" fontSize="1.6rem" />
<FilterArea>
{selectedDictionaryPlant && (
<Name>
<FilterTag>
{selectedDictionaryPlant.name}
<DeleteFilterButton onClick={clear}></DeleteFilterButton>
</Name>
</FilterTag>
)}
</FilterArea>
</Wrapper>
Expand Down

0 comments on commit 99ec7f1

Please sign in to comment.