Skip to content

Commit

Permalink
Merge pull request #108 from delicious-algorithme/dev
Browse files Browse the repository at this point in the history
�fix: 검색바 식당 리스트 상단 고정
  • Loading branch information
Songhyejeong authored Nov 25, 2024
2 parents c2b9f6f + c444ed8 commit 33cee28
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions src/components/common/store/StoreList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,18 +162,20 @@ const StoreList = () => {
);
return (
<StoreListLayout>
<ButtonContainer>
<Button visible="true" color="green" onClickHandler={() => navigate('/')} text="뒤로 가기" />
<Button visible="true" color="green" onClickHandler={allFetchButtonHandler} text="전체 식당 보기" />
</ButtonContainer>
<FilteringContentsContainer>
<StoreListHeader>
<ButtonContainer>
<Button visible="true" color="green" onClickHandler={() => navigate('/')} text="뒤로 가기" />
<Button visible="true" color="green" onClickHandler={allFetchButtonHandler} text="전체 식당 보기" />
</ButtonContainer>
<SearchBarContainer>
<SearchBar
onChangeHandler={(e) => setInput(e.target.value)}
onKeyDownHandler={handleKeyDown}
searchInput={input}
/>
</SearchBarContainer>
</StoreListHeader>
<FilteringContentsContainer>
<Filtering category={category} />
<SortBox>
<p>정렬</p>
Expand Down Expand Up @@ -268,17 +270,18 @@ const Ref = styled.div`

const ButtonContainer = styled.div`
gap: 10px;
position: sticky;
width: 100%;
height: 80px;
height: 60px;
padding: 10px;
top: 0;
display: flex;
flex-direction: row;
align-items: center;
z-index: 20;
background-color: ${White};
border-bottom: 1px solid ${LightGrey};
@media screen and (max-width: 500px) {
height: 50px;
}
`;

const SearchBarContainer = styled.div`
Expand Down Expand Up @@ -340,3 +343,14 @@ const LoadingContainer = styled.div`
margin-right: 90px;
}
`;

const StoreListHeader = styled.div`
position: sticky;
width: 100%;
top: 0;
display: flex;
flex-direction: column;
z-index: 20;
background-color: ${White};
border-bottom: 1px solid ${LightGrey};
`;

0 comments on commit 33cee28

Please sign in to comment.