From 1383018127d68e909eda35c0e4f7abb73b8c8c7c Mon Sep 17 00:00:00 2001 From: ice9js <ice9js@users.noreply.github.com> Date: Mon, 4 Nov 2024 09:07:25 +0000 Subject: [PATCH] External Media / AI Image Generator: update button style (#39985) * External Media / AI Image Generator: update button style See #39934 Let's change the overall styles of the 2 buttons ("Select Image" and "Generate with AI"): - the buttons should be 40px high, like in Core. See https://github.com/WordPress/gutenberg/issues/46741 - the buttons should use the secondary style variant by default, to match the "Insert from URL" button. - the buttons should take the full width of the placeholder on mobile devices. * Ensure the buttons look good in narrow parent blocks See https://github.com/Automattic/jetpack/pull/39985#issuecomment-2449807545 * Simplify styling of the main wrapper The wrapper itself is still necessary unfortunately. Co-authored-by: Filipe Varela <keoshi@keoshi.com> Co-authored-by: jasmussen <joen@git.wordpress.org> * Add logic to change button size based on wp & Gutenberg versions The other buttons in the Image block were changed in this PR: https://github.com/WordPress/gutenberg/pull/65361 This was released with Gutenberg 19.4, and will be included in WP version 6.7. Let's consequently set our own buttons to match. --------- Co-authored-by: Filipe Varela <keoshi@keoshi.com> Co-authored-by: jasmussen <joen@git.wordpress.org> Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/11660975525 Upstream-Ref: Automattic/jetpack@746d1fcec1f8762f33b7dca919db62d28836e67b