Skip to content

Commit

Permalink
Don't use <span> for RichText element
Browse files Browse the repository at this point in the history
  • Loading branch information
WunderBart committed Jan 16, 2020
1 parent 8b62591 commit 009db94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/block-library/src/navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,8 @@ function NavigationLinkEdit( {
'has-link': !! url,
} ) }
>
<div>
<div className="wp-block-navigation-link__content">
<RichText
tagName="span"
className="wp-block-navigation-link__content"
value={ label }
onChange={ ( labelValue ) => setAttributes( { label: labelValue } ) }
placeholder={ itemLabelPlaceholder }
Expand All @@ -172,9 +170,9 @@ function NavigationLinkEdit( {
] }
/>
{ showSubmenuIcon &&
<span className="wp-block-navigation-link__submenu-icon">
<div className="wp-block-navigation-link__submenu-icon">
{ submenuIcon }
</span>
</div>
}
{ isLinkOpen && (
<Popover position="bottom center">
Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/src/navigation-link/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
}

&.has-link .wp-block-navigation-link__content {
display: flex;
align-items: center;
text-decoration: underline;
}

Expand Down

0 comments on commit 009db94

Please sign in to comment.