[#95] ToggleButton component에 onChange event 추가 #96
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.
📝 작업 내용
ToggleButton에onChangeevent handler를 추가할 수 있도록 구현합니다.ToggleButton의 각 option을 클릭하면onChangeevent handler가 실행되고, 전달인자로 선택한 option과 index가 전달됩니다.💬 리뷰어에게 남길 말 (선택)
create-post-page.jsx에서ToggleButton을 사용하고 있어서 함께 수정했습니다.index전달인자를 활용해서 다른 코드를 개선할 수 있다면 issue를 만들고 수정해주세요.