-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
FileUpload: Ability to remove file in basic mode - #2991 #7071
Conversation
feat(fileupload): add file removal functionality in basic mode
…removeButtonSeverity props for basic mode
…emoveButtonSeverity
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>. |
1 similar comment
Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>. |
Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>. |
1 similar comment
Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>. |
Looks like the build is failing? |
Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>. |
It was a format problem, I already corrected the linking issue, it makes me feel bad, not because what the format is or because it doesn't detect it |
I'm sorry, but after discussing with my colleagues, we have decided not to approve this proposal. We appreciate your effort, but we believe users can achieve similar functionality through custom or advanced versions. https://primereact.org/fileupload/#advanced |
This PR adds a feature to the
FileUpload
component that allows thebasic
variant to support file removal (clear functionality). To ensure backward compatibility for existing users, a new prop,showRemoveButton
, has been introduced. This prop enables this new file removal capability when set totrue
.In addition to this, we've introduced the
removeButtonSeverity
prop to allow customization of the remove button's color. This is particularly useful for aligning with different design systems and color schemes, as the default "danger" color may not always be preferred. By using the library's ownButton
component, users can take full advantage of its features, including severity customization.Key Changes:
Feature Addition:
showRemoveButton
: A new prop that controls the visibility of the remove button in thebasic
mode. Default istrue
.removeButtonSeverity
: A new prop to customize the severity (color) of the remove button. Valid values are"secondary"
,"success"
,"info"
,"warning"
,"danger"
,"help"
, and"contrast"
. Default is"danger"
.Documentation:
Testing:
Tasks Completed:
showRemoveButton
andremoveButtonSeverity
props.FileUpload
component to support these features.I’m open to any feedback or changes needed. Please let me know how I can further assist in this process.
Fixes #2991