Skip to content

Commit

Permalink
SpacingSizesControl: Use generic label for linked button (#66304)
Browse files Browse the repository at this point in the history
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: madhusudhand <[email protected]>
Co-authored-by: mikachan <[email protected]>
  • Loading branch information
4 people authored and gutenbergplugin committed Oct 22, 2024
1 parent 17e96c7 commit d685646
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 d685646

Please sign in to comment.