Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToolbarButton: Deprecate isDisabled prop and merge with disabled #63101

Merged
merged 4 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Migrate isDisabled usage in codebase
  • Loading branch information
mirka committed Jul 3, 2024
commit cc441ed0424a8138ebbb7f07e09b7b4c5678b12f
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function GridItemMovers( {
<ToolbarButton
icon={ arrowUp }
label={ __( 'Move block up' ) }
isDisabled={ rowStart <= 1 }
disabled={ rowStart <= 1 }
onClick={ () => {
onChange( {
rowStart: rowStart - 1,
Expand All @@ -66,7 +66,7 @@ export function GridItemMovers( {
<ToolbarButton
icon={ arrowDown }
label={ __( 'Move block down' ) }
isDisabled={ rowCount && rowEnd >= rowCount }
disabled={ rowCount && rowEnd >= rowCount }
onClick={ () => {
onChange( {
rowStart: rowStart + 1,
Expand All @@ -86,7 +86,7 @@ export function GridItemMovers( {
<ToolbarButton
icon={ arrowLeft }
label={ __( 'Move block left' ) }
isDisabled={ columnStart <= 1 }
disabled={ columnStart <= 1 }
onClick={ () => {
onChange( {
columnStart: columnStartNumber - 1,
Expand All @@ -106,7 +106,7 @@ export function GridItemMovers( {
<ToolbarButton
icon={ arrowRight }
label={ __( 'Move block right' ) }
isDisabled={ columnCount && columnEnd >= columnCount }
disabled={ columnCount && columnEnd >= columnCount }
onClick={ () => {
onChange( {
columnStart: columnStartNumber + 1,
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/list-item/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function IndentUI( { clientId } ) {
icon={ isRTL() ? formatIndentRTL : formatIndent }
title={ __( 'Indent' ) }
describedBy={ __( 'Indent list item' ) }
isDisabled={ ! canIndent }
disabled={ ! canIndent }
onClick={ () => indentListItem() }
/>
</>
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/navigation-submenu/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ export default function NavigationSubmenuEdit( {
title={ __( 'Convert to Link' ) }
onClick={ transformToLink }
className="wp-block-navigation__submenu__revert"
isDisabled={ ! canConvertToLink }
disabled={ ! canConvertToLink }
/>
</ToolbarGroup>
</BlockControls>
Expand Down
Loading