-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(toast-notification): remove default value from optional caption prop #7901
fix(toast-notification): remove default value from optional caption prop #7901
Conversation
Deploy preview for carbon-elements ready! Built with commit 7b85334 |
Deploy preview for carbon-components-react ready! Built without sensitive environment variables with commit 7b85334 https://deploy-preview-7901--carbon-components-react.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kingtraceyj updated 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 ✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me. thanks for the update!
According to the toast notification's component guidelines and the propTypes, the
caption
prop (intended for timestamp) is optional. However, currently it defaults to "provide a caption" whicha) makes it seem to be required (as other component usually do this for missing, required props such as titles), and
b) require the developer to pass an empty caption to the component in order to remove it, which is unusual for an optional prop
Changelog
Removed
props.caption
inToastNotification
Testing / Reviewing