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.
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
feat: alert component #3680
feat: alert component #3680
Changes from all commits
efb8ec6
d746f6c
0de2883
55b479e
f2b5252
4634e11
547a9dc
d302984
dbc3e44
e783488
98589e7
d352f9b
4a9e147
c079cc0
d8f5b5e
7d13e87
e957365
5f7f907
b1e031e
e56acda
099378d
7402add
e60dea2
4fcb4c0
248fecd
bc9205e
2d94b00
a699cc4
81552c8
e185212
9c727c2
26198ec
b29ccae
c74b064
64a4178
a83282b
12b5f36
f7fd9c7
14bea4a
44efbaf
9897573
d271053
e6efe4f
e4aa2ac
7003759
71fa1f3
13102e8
f4dbcf9
3f3a7d0
04c5a14
316fa11
29c38e2
7069361
d1609eb
af2adc2
61df0e4
7202be5
682e9be
c9a3781
9567d16
22c6a51
427c4fe
c4b0987
c1d0ae9
02dd710
0e6e8a8
1c94c04
eebab5d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
🛠️ Refactor suggestion
Consider using constants or a configuration object for alert content.
The title and description are currently hardcoded. To improve reusability and facilitate potential internationalization, consider defining these strings as constants or part of a configuration object.
Here's a suggested approach:
This change would make it easier to update content and potentially support multiple languages in the future.
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.
🛠️ Refactor suggestion
Consider adding dismissibility to the Alert component.
The current implementation showcases the
Alert
component with different colors, which is great. However, one of the objectives mentioned in the PR was to allow users to dismiss the alert. Consider adding adismissible
prop or anonClose
handler to theAlert
component to fulfill this requirement.Here's a suggested modification:
This change would allow users to dismiss the alert, aligning with the PR objectives and enhancing user interaction.
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.
Add missing import for
AlertCloseIcon
.The
AlertCloseIcon
component is used in the code but not imported. To ensure the code works correctly, please import it from '@nextui-org/react'.Apply this diff to add the missing import:
📝 Committable suggestion