forked from WordPress/gutenberg
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
537 additions
and
334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
https://github.com/WordPress/wordpress-develop/pull/7061 | ||
|
||
* https://github.com/WordPress/gutenberg/pull/63726 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
packages/block-editor/src/components/block-tools/zoom-out-mode-inserter-button.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import clsx from 'clsx'; | ||
|
||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { useState } from '@wordpress/element'; | ||
import { Button } from '@wordpress/components'; | ||
import { plus } from '@wordpress/icons'; | ||
import { _x } from '@wordpress/i18n'; | ||
|
||
function ZoomOutModeInserterButton( { isVisible, onClick } ) { | ||
const [ | ||
zoomOutModeInserterButtonHovered, | ||
setZoomOutModeInserterButtonHovered, | ||
] = useState( false ); | ||
|
||
return ( | ||
<Button | ||
variant="primary" | ||
icon={ plus } | ||
size="compact" | ||
className={ clsx( | ||
'block-editor-button-pattern-inserter__button', | ||
'block-editor-block-tools__zoom-out-mode-inserter-button', | ||
{ | ||
'is-visible': isVisible || zoomOutModeInserterButtonHovered, | ||
} | ||
) } | ||
onClick={ onClick } | ||
onMouseOver={ () => { | ||
setZoomOutModeInserterButtonHovered( true ); | ||
} } | ||
onMouseOut={ () => { | ||
setZoomOutModeInserterButtonHovered( false ); | ||
} } | ||
label={ _x( | ||
'Add pattern', | ||
'Generic label for pattern inserter button' | ||
) } | ||
/> | ||
); | ||
} | ||
|
||
export default ZoomOutModeInserterButton; |
Oops, something went wrong.