[FE] refactor: MediaControlButton 개선 #226
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR 설명
MediaControlButton을 Mic와 Video Button으로 분리하고, onColor와 offColor를 props로 받아 색상 문제 해결
✅ 완료한 기능 명세
📸 스크린샷
고민과 해결과정
굳이 kind를 통해 조건부 렌더링을 시킬 필요가 없다고 생각하게되었고 따라서 kind를 기준으로 다르게 렌더링 시켰던 부분을 제거하였음
또한 재사용시 켜졌을때와 꺼졌을 때의 색상을 다르게 줘야하는 부분이 있어 문제가 있었는데, 이부분을 해결하기 위해 props로 onColor와 offColor를 넣어서 해결함