Skip to content

Commit

Permalink
Proposing an updated design with button
Browse files Browse the repository at this point in the history
  • Loading branch information
fushar committed Feb 3, 2025
1 parent cc6bb9f commit 984679d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@ const WpcomMediaUrlUploadForm = ( { ajaxUrl, action, nonce, isSiteEditor } ) =>

const renderLink = () => {
return (
<a href="#" onClick={ () => setShow( true ) } className="woy">
<button
className="button wpcom-media-url-upload-form__pre-upload-button"
onClick={ () => setShow( true ) }
>
{ __( 'Upload from URL', 'jetpack-mu-wpcom' ) }
</a>
</button>
);
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
.wpcom-media-url-upload-form {
button#{&}__pre-upload-button {
padding: 0 21px;
margin-top: -15px;
margin-bottom: 20px;
}

input {
width: 100%;
max-width: 600px;
margin-right: 6px;
margin-bottom: 5px;
}
}

.media-frame a.woy {
color: unset;
form {
margin-top: -15px;
margin-bottom: 21.5px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ function wpcom_handle_media_url_upload() {
}

if ( current_user_can( 'upload_files' ) ) {
add_action( 'post-plupload-upload-ui', 'wpcom_media_url_upload', 20 );
add_action( 'pre-upload-ui', 'wpcom_media_url_upload', 9 );
add_action( 'wp_ajax_wpcom_media_url_upload', 'wpcom_handle_media_url_upload' );
}

0 comments on commit 984679d

Please sign in to comment.