Skip to content

Commit

Permalink
Remove unnecessary Tooltip component.
Browse files Browse the repository at this point in the history
  • Loading branch information
afercia committed Oct 21, 2024
1 parent 0b972a8 commit 2400288
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 2400288

Please sign in to comment.