-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Chore: STACKS 상수 배열 생성 * Feat: Stack 및 Stack을 사용하는 Position Type 구현 * Fix: StackType 수정 * Feat: Image관련 타입 구현 * Chore: Stack 데이터 변경 및 STACK_NAMES만 모은 변수 생성 Stack_names는 stack 이름이 모두 저장된 배열, mock 데이터같이 쓸 수 있음 * Refactor: ICONS 변수 Images 타입 할당 * Chore: stackIcons.ts 삭제 * Fix: Stack에 맞게 icon 출력 수정 및 style * Fix: 변경된 Stack에 따라 Stacks 컴포넌트 수정 * Fix: FilterButton 클릭시 화살표 방향 뒤집어짐 * Feat: FilterList 컴포넌트 디자인 기본 구현 * Feat: FilterList내 개별 Filter 디자인 추가 * Feat: SelectLayout 컴포넌트 기본 디자인 세팅 * Feat: StackPopover 컴포넌트 기본 구현 * Chore: reset.svg 추가 * Feat: ResetButton 구현 * Chore: 코드 여백 수정 * Fix: 스타일드 상속을 위해 className 프롭 생성 * Fix: StackPopover 컴포넌트 position 변경 * Fix: DefaultChip 이미지부분 Stack 컴포넌트로 대체 * Fix: Stack 컴포넌트 prop 변경 * Feat: StackChipGrid 구현 * Fix: FilterList filter 외부에서 관리 * Fix: StackChip 잘못된 너비 수정 * Feat: DefaultChip 디자인 수정 * Feat: StackChip 디자인 수정 * Feat: Stack 컴포넌트 확장 가능하게 변경 * Fix: FilterList 범용성있게 원복 * Fix: Chip overflow 담당 변경 * Fix: DeleteStackChip onClick으로 prop넘긴 오류 수정 * Feat: DeleteStackChipList 컴포넌트 구현 * Chore: StackChipGrid -> StackChipList 이름 변경 * Refactor: StacksPopover toogle로 상태 관리 * Chore: StacksPopover에 사용되는 constant 파일 생성 * Chore: StackPopover 폴더 위치 변경 * Fix: DefaultChip title 툴팁 추가 * Chore: DetailCard, FilterDropButton 폴더 위치 및 파일 이름 변경 * Refactor: StackPopover 컴포넌트 변경된 하위 컴포넌트 이름 반영 * Feat: FilterValue에서 FilterKey가지고 오는 함수 구현 * Chore: Design_Token 값 추가 및 반영 * Refactor: filter key가지고 오는 메소드 적용 및 css 조정 * Fix: SelectLayout width css 수정 * Feat: StackPopover 폴더 위치 변경 후 값 변경, getFilterKey Util함수 생성
- Loading branch information
1 parent
9aea4eb
commit 966a43b
Showing
27 changed files
with
580 additions
and
85 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import DESIGN_TOKEN from "@/styles/tokens"; | ||
import { MouseEvent } from "react"; | ||
import styled from "styled-components"; | ||
|
||
interface FilterListProps { | ||
currentFilter: string | ||
filters: string[]; | ||
onFilterClick(filter: string): void; | ||
className?: string; | ||
} | ||
|
||
export default function FilterList({ currentFilter, filters, onFilterClick, className }: FilterListProps) { | ||
|
||
const handleFilterClick = (e: MouseEvent<HTMLDivElement>) => { | ||
const filter = e.currentTarget.textContent; | ||
if (filter) { | ||
onFilterClick(filter); | ||
} | ||
}; | ||
|
||
return ( | ||
<Container className={className}> | ||
{filters.map((filter) => ( | ||
<Box key={filter} $isSelected={currentFilter === filter} onClick={handleFilterClick}> | ||
{filter} | ||
</Box> | ||
))} | ||
</Container> | ||
); | ||
} | ||
|
||
const { color, typography, mediaQueries } = DESIGN_TOKEN; | ||
|
||
const Container = styled.div` | ||
display: flex; | ||
gap: 2rem; | ||
color: ${color.gray[1]}; | ||
${typography.font16Bold} | ||
${mediaQueries.mobile} { | ||
gap: 1.6rem; | ||
${typography.font14Bold} | ||
} | ||
`; | ||
|
||
interface BoxProps { | ||
$isSelected?: boolean; | ||
} | ||
|
||
const Box = styled.div<BoxProps>` | ||
${({ $isSelected }) => $isSelected && `color: ${color.black[1]};`} | ||
&:hover { | ||
cursor: pointer; | ||
${({ $isSelected }) => !$isSelected && `color: ${color.black[3]};`} | ||
} | ||
`; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.