From 92eab2daf5db63f3003a3ea3f1bc1eee9cbcb6e1 Mon Sep 17 00:00:00 2001 From: Rinkal Pagdar <92097119+rinkalpagdar@users.noreply.github.com> Date: Tue, 17 Dec 2024 13:08:50 +0530 Subject: [PATCH] lint fix --- .../src/post-navigation-link/edit.js | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/packages/block-library/src/post-navigation-link/edit.js b/packages/block-library/src/post-navigation-link/edit.js index e8724b6a57615..4d14439729988 100644 --- a/packages/block-library/src/post-navigation-link/edit.js +++ b/packages/block-library/src/post-navigation-link/edit.js @@ -95,23 +95,25 @@ export default function PostNavigationLinkEdit( { return ( <> - + !!showTitle} - label={__('Display the title as a link')} - onDeselect={() => setAttributes({ showTitle: false })} + hasValue={ () => !! showTitle } + label={ __( 'Display the title as a link' ) } + onDeselect={ () => + setAttributes( { showTitle: false } ) + } > - setAttributes({ - showTitle: !showTitle, - }) + ) } + checked={ !! showTitle } + onChange={ () => + setAttributes( { + showTitle: ! showTitle, + } ) } /> @@ -131,49 +133,47 @@ export default function PostNavigationLinkEdit( { /> ) } !!arrow} - label={__('Arrow')} - onDeselect={() => setAttributes({ arrow: 'none' })} + hasValue={ () => !! arrow } + label={ __( 'Arrow' ) } + onDeselect={ () => setAttributes( { arrow: 'none' } ) } > { - setAttributes({ arrow: value }); - }} - help={__( + label={ __( 'Arrow' ) } + value={ arrow } + onChange={ ( value ) => { + setAttributes( { arrow: value } ); + } } + help={ __( 'A decorative arrow for the next and previous link.' - )} + ) } isBlock > - -