Skip to content

Commit

Permalink
refactor: 코드 가독성 향상
Browse files Browse the repository at this point in the history
- css trasform 함수 중복 제거
- close -> open 으로 바꿔서 상태 단축
  • Loading branch information
JeongWon-CHO committed Sep 28, 2024
1 parent 995b868 commit 799aee9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,9 @@
}

.arrow-icon {
transform: rotate(180deg);
transition: all 0.4s ease;

&--close {
transform: rotate(0);
&--open {
transform: rotate(180deg);
}
}
2 changes: 1 addition & 1 deletion src/pages/Coop/components/DiningBlocks/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export default function DiningBlocks({ diningType, date }: DiningBlocksProps) {
<svg
className={cn({
[styles['arrow-icon']]: true,
[styles['arrow-icon--close']]: !hiddenDiningIdList.includes(dining.id),
[styles['arrow-icon--open']]: hiddenDiningIdList.includes(dining.id),
})}
width="20"
height="21"
Expand Down

0 comments on commit 799aee9

Please sign in to comment.