Skip to content

Commit

Permalink
SpacingSizesControl: Use generic label for linked button (WordPress#6…
Browse files Browse the repository at this point in the history
…6304)

Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: madhusudhand <madhudollu@git.wordpress.org>
Co-authored-by: mikachan <mikachan@git.wordpress.org>
  • Loading branch information
4 people authored and karthick-murugan committed Nov 13, 2024
1 parent e677c86 commit 852f55d
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,10 @@
*/
import { Button, Tooltip } from '@wordpress/components';
import { link, linkOff } from '@wordpress/icons';
import { __, sprintf } from '@wordpress/i18n';
import { __ } from '@wordpress/i18n';

export default function LinkedButton( { isLinked, ...props } ) {
const label = isLinked
? sprintf(
// translators: 1. Type of spacing being modified (padding, margin, etc).
__( 'Unlink %1$s' ),
props.label.toLowerCase()
).trim()
: sprintf(
// translators: 1. Type of spacing being modified (padding, margin, etc).
__( 'Link %1$s' ),
props.label.toLowerCase()
).trim();
const label = isLinked ? __( 'Unlink sides' ) : __( 'Link sides' );

return (
<Tooltip text={ label }>
Expand Down

0 comments on commit 852f55d

Please sign in to comment.