Skip to content

Commit

Permalink
Font Library: Use Button's API to disable footer buttons (#58529)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano authored Feb 1, 2024
1 parent ece4d7d commit afa8b5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,10 @@ function Footer( { handleInstall, isDisabled } ) {
<Flex justify="flex-end">
<Button
variant="primary"
onClick={
isDisabled || isInstalling ? undefined : handleInstall
}
onClick={ handleInstall }
isBusy={ isInstalling }
aria-disabled={ isDisabled || isInstalling }
disabled={ isDisabled || isInstalling }
__experimentalIsFocusable
>
{ __( 'Install' ) }
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,10 @@ function Footer( { shouldDisplayDeleteButton, handleUninstallClick } ) {
) }
</div>
<Button
aria-disabled={ ! fontFamiliesHasChanges }
variant="primary"
onClick={
fontFamiliesHasChanges ? saveFontFamilies : undefined
}
onClick={ saveFontFamilies }
disabled={ ! fontFamiliesHasChanges }
__experimentalIsFocusable
>
{ __( 'Update' ) }
</Button>
Expand Down

0 comments on commit afa8b5c

Please sign in to comment.