From f5eb420e022df9b9fcd7505a47a149b6070e85e1 Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Mon, 23 May 2022 17:41:19 +0100 Subject: [PATCH] Post Comments: Make the button an element button --- .../block-library/src/post-comments-form/form.js | 12 +++++++++++- .../block-library/src/post-comments-form/index.php | 2 +- packages/block-library/src/post-comments/index.php | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/block-library/src/post-comments-form/form.js b/packages/block-library/src/post-comments-form/form.js index 51212c925cec50..d9c11d0be80e07 100644 --- a/packages/block-library/src/post-comments-form/form.js +++ b/packages/block-library/src/post-comments-form/form.js @@ -1,7 +1,13 @@ +/** + * External dependencies + */ +import classnames from 'classnames'; + /** * WordPress dependencies */ import { __ } from '@wordpress/i18n'; +import { __experimentalElementButtonClassName } from '@wordpress/block-editor'; import { useDisabled, useInstanceId } from '@wordpress/compose'; const CommentsForm = () => { @@ -27,7 +33,11 @@ const CommentsForm = () => { diff --git a/packages/block-library/src/post-comments-form/index.php b/packages/block-library/src/post-comments-form/index.php index accceace3cdb9b..c2ef5bcb762a60 100644 --- a/packages/block-library/src/post-comments-form/index.php +++ b/packages/block-library/src/post-comments-form/index.php @@ -72,7 +72,7 @@ function register_block_core_post_comments_form() { */ function post_comments_form_block_form_defaults( $fields ) { if ( wp_is_block_theme() ) { - $fields['submit_button'] = ''; + $fields['submit_button'] = ''; $fields['submit_field'] = '

%1$s %2$s

'; } diff --git a/packages/block-library/src/post-comments/index.php b/packages/block-library/src/post-comments/index.php index 2b20a9494eef3e..5520184408b242 100644 --- a/packages/block-library/src/post-comments/index.php +++ b/packages/block-library/src/post-comments/index.php @@ -78,7 +78,7 @@ function register_block_core_post_comments() { */ function post_comments_block_form_defaults( $fields ) { if ( wp_is_block_theme() ) { - $fields['submit_button'] = ''; + $fields['submit_button'] = ''; $fields['submit_field'] = '

%1$s %2$s

'; }