Skip to content

Commit

Permalink
Remove unnecessary Tooltip component from radius control linked button (
Browse files Browse the repository at this point in the history
WordPress#66274)

Co-authored-by: afercia <afercia@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
  • Loading branch information
3 people authored and karthick-murugan committed Nov 13, 2024
1 parent b071c75 commit c255a12
Showing 1 changed file with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
/**
* 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 radii' ) : __( 'Link radii' );

return (
<Tooltip text={ label }>
<Button
{ ...props }
className="component-border-radius-control__linked-button"
size="small"
icon={ isLinked ? link : linkOff }
iconSize={ 24 }
aria-label={ label }
/>
</Tooltip>
<Button
{ ...props }
className="component-border-radius-control__linked-button"
size="small"
icon={ isLinked ? link : linkOff }
iconSize={ 24 }
label={ label }
/>
);
}

0 comments on commit c255a12

Please sign in to comment.