-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update empty placeholder state with preview
- Loading branch information
Showing
4 changed files
with
38 additions
and
26 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
26 changes: 26 additions & 0 deletions
26
packages/block-library/src/navigation/placeholder-preview.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,26 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import classNames from 'classnames'; | ||
|
||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { Icon, search } from '@wordpress/icons'; | ||
|
||
const PlaceholderPreview = ( { hideSelected } ) => { | ||
const classes = classNames( 'wp-block-navigation-placeholder__preview', { | ||
'wp-block-navigation-placeholder__preview_select_hide': hideSelected, | ||
} ); | ||
|
||
return ( | ||
<div className={ classes }> | ||
<span className="wp-block-navigation-link"></span> | ||
<span className="wp-block-navigation-link"></span> | ||
<span className="wp-block-navigation-link"></span> | ||
<Icon icon={ search } /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default PlaceholderPreview; |
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