-
Notifications
You must be signed in to change notification settings - Fork 4.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
Image Block: Adding an image upload button #2260
Conversation
components/form-file-button/index.js
Outdated
@@ -0,0 +1,51 @@ | |||
/** |
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.
Should we call this FileUpload
? I don't think I would have found it easily with this name.
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.
I try to group all the "form" related components by calling them Form*
but I don't mind changing.
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.
FormFileUpload
maybe
Codecov Report
@@ Coverage Diff @@
## master #2260 +/- ##
=========================================
- Coverage 24.21% 24% -0.21%
=========================================
Files 142 145 +3
Lines 4465 4541 +76
Branches 758 768 +10
=========================================
+ Hits 1081 1090 +9
- Misses 2857 2916 +59
- Partials 527 535 +8
Continue to review full report at Codecov.
|
Works great for me! |
@jasmussen the upload button has a hover effect that the "insert from media library" does not. Not sure what the status should be. |
The blue hover effect is caused by the button having a |
Fixed the hover color, kept the class because it's automatically included in the IconButton component. |
Looks good, it works for me. I want to use the same method for the Gallery block and uploading of multiple images. Looking at the code, it looks like you have support for multiple in the 👍 to commit and I can abstract it out for you if you like |
@mkaz yeah, we'd probably want to extract this function somewhere. Let's merge this and will let you abstract while working on the gallery. Thanks everyone for the reviews. Merging |
to upload an image without opening the media modal.
closes #1702