Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen committed Jan 12, 2021
1 parent 496ca33 commit a56c853
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
3 changes: 0 additions & 3 deletions packages/block-library/src/navigation/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,7 @@ $color-control-label-height: 20px;
svg {
opacity: 0.3;
}
}

.wp-block-navigation-placeholder__preview_select_hide {
// Hide when selected.
.is-selected & {
display: none;
}
Expand Down
13 changes: 2 additions & 11 deletions packages/block-library/src/navigation/placeholder-preview.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
/**
* 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,
} );

const PlaceholderPreview = () => {
return (
<div className={ classes }>
<div className="wp-block-navigation-placeholder__preview">
<span className="wp-block-navigation-link"></span>
<span className="wp-block-navigation-link"></span>
<span className="wp-block-navigation-link"></span>
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/navigation/placeholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ function NavigationPlaceholder( { onCreate }, ref ) {

return (
<div className="wp-block-navigation-placeholder">
<PlaceholderPreview hideSelected={ true } />
<PlaceholderPreview />

<div className="wp-block-navigation-placeholder__controls">
{ isLoading && (
Expand Down

0 comments on commit a56c853

Please sign in to comment.