Skip to content

Commit

Permalink
RichText: add or fix identifier props
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnajdr committed Mar 20, 2024
1 parent bd5a7c8 commit 014f6eb
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/block-library/src/details/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function DetailsEdit( { attributes, setAttributes, clientId } ) {
>
<summary onClick={ ( event ) => event.preventDefault() }>
<RichText
identifier="summary"
aria-label={ __( 'Write summary' ) }
placeholder={ __( 'Write summary…' ) }
allowedFormats={ [] }
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/post-navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ export default function PostNavigationLinkEdit( {
</span>
) }
<RichText
identifier="label"
tagName="a"
aria-label={ ariaLabel }
placeholder={ placeholder }
Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/src/post-terms/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export default function PostTermsEdit( {
{ isLoading && hasPost && <Spinner /> }
{ ! isLoading && ( isSelected || prefix ) && (
<RichText
identifier="prefix"
allowedFormats={ ALLOWED_FORMATS }
className="wp-block-post-terms__prefix"
aria-label={ __( 'Prefix' ) }
Expand Down Expand Up @@ -138,6 +139,7 @@ export default function PostTermsEdit( {
__( 'Term items not found.' ) ) }
{ ! isLoading && ( isSelected || suffix ) && (
<RichText
identifier="suffix"
allowedFormats={ ALLOWED_FORMATS }
className="wp-block-post-terms__suffix"
aria-label={ __( 'Suffix' ) }
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/read-more/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default function ReadMore( {
</PanelBody>
</InspectorControls>
<RichText
identifier="content"
tagName="a"
aria-label={ __( '“Read more” link text' ) }
placeholder={ __( 'Read more' ) }
Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/src/search/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ export default function SearchEdit( {

{ ! buttonUseIcon && (
<RichText
identifier="buttonText"
className={ buttonClasses }
style={ buttonStyles }
aria-label={ __( 'Button text' ) }
Expand Down Expand Up @@ -546,6 +547,7 @@ export default function SearchEdit( {

{ showLabel && (
<RichText
identifier="label"
className={ labelClassnames }
aria-label={ __( 'Label text' ) }
placeholder={ __( 'Add label…' ) }
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/search/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ export default function SearchEdit( {
>
<RichText
className="wp-block-search__button"
identifier="text"
identifier="buttonText"
tagName="p"
style={ richTextButtonStyle }
placeholder={ buttonPlaceholderText }
Expand Down Expand Up @@ -449,7 +449,7 @@ export default function SearchEdit( {
>
<RichText
className="wp-block-search__label"
identifier="text"
identifier="label"
tagName="p"
style={ styles.richTextLabel }
placeholder={ __( 'Add label…' ) }
Expand Down
1 change: 1 addition & 0 deletions packages/widgets/src/blocks/widget-group/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function PreviewContent( { attributes, setAttributes } ) {
return (
<>
<RichText
identifier="title"
tagName="h2"
className="widget-title"
allowedFormats={ [] }
Expand Down

0 comments on commit 014f6eb

Please sign in to comment.