refactor(Toast): Toast 컴포넌트 storybook 및 접근성 개선#281
Open
Conversation
|
|
Contributor
constantly-dev
left a comment
There was a problem hiding this comment.
수고하셨습니다 간단한 코멘트만 확인해주세요!
추가로 useToast나 toast component에서 리팩터링 할 부분은 없을까요?
Comment on lines
21
to
22
| const isDefaultIcon = typeof icon === 'string'; | ||
| const DefaultIcon = isDefaultIcon ? convertToIcon[icon] : undefined; |
Contributor
Member
Author
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


변경사항
Toast 컴포넌트 Story명을 변경하였으며, description을 구체화했습니다.
기존 toast prop 중 action이 객체 형태여서 스토리북에 나타낼 땐 이에 대한 기능을 구체적으로 확인하지 못했는데, 이 객체 부분을
actionName,onActionClick의 두 개의 prop으로 나타내어 평면화함으로써 각각의 prop이 어떤 역할을 하는지 명시하고, 제어 가능하도록 수정했습니다.또한 Toast 구현부에서
aria-live속성을 통해 동적인 변경 부분(Toast 문구)을 감지해서 알려줄 수 있도록 했으며,aria-atomic: true을 통해 변경된 부분 전체를 읽도록 속성을 추가했습니다시급한 정도
🏃♂️ 보통 : 최대한 빠르게 리뷰 부탁드립니다.