feat(Dialog): cancelButton과 approveButton에 onClick 핸들러 추가 #321
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.
변경 사항
Dialog 컴포넌트의
typeOptions에onCancel과onApprove핸들러를 추가하여, cancelButton과 approveButton 클릭 시 커스텀 로직을 실행할 수 있도록 개선했습니다.주요 변경 내역
packages/ui/Dialog/types.tsTypeOptionsProp에onApprove,onCancel핸들러 추가buttonFunction을 deprecated 처리 (onApprove로 대체)packages/ui/Dialog/DialogComponent.tsxonCancel함수 추가: cancelButton 클릭 시typeOptions.onCancel실행 후 다이얼로그 닫기onApprove함수 수정: 기존buttonFunction과의 하위 호환성 유지하면서onApprove지원onClick핸들러를onClose에서onCancel로 변경개선 효과
onApprove핸들러로 명확하게 사용 가능buttonFunction사용 코드의 하위 호환성 유지사용 예시
Breaking Changes
없음 (하위 호환성 유지)