-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Components: Remove unnecessary
Tooltip
component from linked `butto…
…n` (#68498) * fix: Removed extra tooltips component in button component * fix: label name * fix: Removed view component * doc: Update changelog for unreleased section * Add heading before new changelog entry --------- Co-authored-by: im3dabasia <im3dabasia1@git.wordpress.org> Co-authored-by: afercia <afercia@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org>
- Loading branch information
1 parent
2eaed20
commit d516b23
Showing
4 changed files
with
29 additions
and
35 deletions.
There are no files selected for viewing
18 changes: 8 additions & 10 deletions
18
packages/block-editor/src/components/spacing-sizes-control/linked-button.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { Button, Tooltip } from '@wordpress/components'; | ||
import { Button } from '@wordpress/components'; | ||
import { link, linkOff } from '@wordpress/icons'; | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
export default function LinkedButton( { isLinked, ...props } ) { | ||
const label = isLinked ? __( 'Unlink sides' ) : __( 'Link sides' ); | ||
|
||
return ( | ||
<Tooltip text={ label }> | ||
<Button | ||
{ ...props } | ||
size="small" | ||
icon={ isLinked ? link : linkOff } | ||
iconSize={ 24 } | ||
aria-label={ label } | ||
/> | ||
</Tooltip> | ||
<Button | ||
{ ...props } | ||
size="small" | ||
icon={ isLinked ? link : linkOff } | ||
iconSize={ 24 } | ||
label={ label } | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d516b23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flaky tests detected in d516b23.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.
🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12951121203
📝 Reported issues:
/test/e2e/specs/site-editor/site-editor-url-navigation.spec.js