Skip to content

Commit

Permalink
Restore span for search block
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Mar 25, 2021
1 parent 595aba1 commit 2385eff
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions packages/block-library/src/search/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,19 +149,21 @@ export default function SearchEdit( {
) }

{ ! buttonUseIcon && (
<RichText
type="submit"
className="wp-block-search__button"
tagName="button"
style={ { display: 'inline-block' } }
aria-label={ __( 'Button text' ) }
placeholder={ __( 'Add button text…' ) }
withoutInteractiveFormatting
value={ buttonText }
onChange={ ( html ) =>
setAttributes( { buttonText: html } )
}
/>
// This rule only makes sense for UI not blocks.
// eslint-disable-next-line react/forbid-elements
<button type="submit" className="wp-block-search__button">
<RichText
tagName="span"
style={ { display: 'inline-block' } }
aria-label={ __( 'Button text' ) }
placeholder={ __( 'Add button text…' ) }
withoutInteractiveFormatting
value={ buttonText }
onChange={ ( html ) =>
setAttributes( { buttonText: html } )
}
/>
</button>
) }
</>
);
Expand Down

0 comments on commit 2385eff

Please sign in to comment.